Skip to content

Commit

Permalink
Initial work on client-side window decorations
Browse files Browse the repository at this point in the history
  • Loading branch information
iBelieve committed Jan 31, 2015
1 parent 0157323 commit 1e3fd29
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
4 changes: 4 additions & 0 deletions modules/Material/ApplicationWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ Controls.ApplicationWindow {

property bool clientSideDecorations: false

flags: clientSideDecorations ? Qt.FramelessWindowHint : 0

AppTheme {
id: __theme
}
Expand All @@ -84,6 +86,8 @@ Controls.ApplicationWindow {
width: parent.width
backgroundColor: Theme.primaryColor
z: 1

clientSideDecorations: app.clientSideDecorations
}

PageStack {
Expand Down
24 changes: 23 additions & 1 deletion modules/Material/Toolbar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,13 @@ View {

Controls.StackView {
id: stack
width: parent.width
height: toolbar.implicitHeight

anchors {
left: parent.left
right: clientSideDecorations ? windowControls.left : parent.right
}

delegate: Controls.StackViewDelegate {
pushTransition: Controls.StackViewTransition {
SequentialAnimation {
Expand Down Expand Up @@ -147,6 +151,24 @@ View {
}
}

Row {
id: windowControls

anchors {
verticalCenter: stack.verticalCenter
right: parent.right
rightMargin: units.dp(16)
}

spacing: units.dp(24)

IconButton {
name: "navigation/close"
color: Theme.lightDark(toolbar.backgroundColor, Theme.light.textColor,
Theme.dark.textColor)
}
}

Tabs {
id: tabbar
color: toolbar.backgroundColor
Expand Down

0 comments on commit 1e3fd29

Please sign in to comment.