Make sidebar dissapear if thiner than 200px
Often I wanted to make the sidebar dissapear because I don't need it. This patch let's you make it dissapear when it's thinner than 200px and reappear if it's wider.
This commit is contained in:
parent
3a0b18e51e
commit
cb649951ae
2 changed files with 7 additions and 3 deletions
|
@ -48,6 +48,13 @@ ScrollView {
|
|||
}
|
||||
}
|
||||
|
||||
onWidthChanged: {
|
||||
// Hide sidebar if smaller than 200px wide
|
||||
if(width < 200) {
|
||||
width = 0;
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: listView
|
||||
|
||||
|
@ -85,8 +92,6 @@ ScrollView {
|
|||
}
|
||||
|
||||
item.content.post = server.posts[currentIndex]
|
||||
//content.flickableItem.contentY = 0
|
||||
|
||||
previousPost = item.content.post
|
||||
}
|
||||
}
|
||||
|
|
|
@ -184,7 +184,6 @@ ApplicationWindow {
|
|||
content: content
|
||||
server: server
|
||||
|
||||
Layout.minimumWidth: 200
|
||||
implicitWidth: 300
|
||||
textFontSize: app.textFontSize
|
||||
nightmode: app.nightmode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue