Commit 9a2af506 authored by Adam Pigg's avatar Adam Pigg

Fixup crazy font sizes in the app switcher

parent 009f635e
......@@ -22,7 +22,7 @@
// Copyright (c) 2011, Tom Swindell <t.swindell@rubyx.co.uk>
// Copyright (c) 2012, Timur Kristóf <venemo@fedoraproject.org>
import QtQuick 2.0
import QtQuick 2.2
import org.nemomobile.lipstick 0.1
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......@@ -91,7 +91,7 @@ Item {
height: width * (desktop.height / desktop.width)
// The outer Item is necessary because of animations in SwitcherItem changing
// its size, which would break the Grid.
// its size, which would break the Grid.
SwitcherItem {
id: switcherItem
width: parent.width
......@@ -126,45 +126,66 @@ Item {
}
Behavior on anchors.bottomMargin { PropertyAnimation { duration: 100 } }
Button {
id: toolBarDone
width: parent.width / 3
height: width
anchors {
top: parent.top
topMargin: toolBar.padding
right: parent.horizontalCenter
rightMargin: toolBar.padding
}
text: 'Done'
onClicked: {
switcherRoot.closeMode = false;
}
style: ButtonStyle {
label: Label {
text: "Done"
anchors.fill: parent
anchors.margins: 10
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
fontSizeMode: Text.HorizontalFit
anchors.centerIn: parent
}
}
}
Button {
id: toolBarCloseAll
width: toolBarDone.width
height: width
anchors {
top: parent.top
topMargin: toolBar.padding
left: parent.horizontalCenter
leftMargin: toolBar.padding
}
text: 'Close all'
onClicked: {
// TODO: use close animation inside item
for (var i = gridRepeater.count - 1; i >= 0; i--) {
gridRepeater.itemAt(i).close()
}
}
style: ButtonStyle {
label: Label {
text: "Close\nAll"
anchors.margins: 10
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
fontSizeMode: Text.Fit
anchors.centerIn: parent
}
}
}
}
// Empty switcher indicator
Label {
visible: switcherModel.itemCount === 0
text: "No apps open"
width: parent.width
fontSizeMode: Text.HorizontalFit
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment