improve margins in all pages

--take into account that a vertical scroll bar
could appear and also give more margin to
sub-items comparing to headers
v0.6
Michail Vourlakos 8 years ago
parent 306e242a54
commit c7437d8e8f

@ -30,16 +30,16 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.1 as Latte import org.kde.latte 0.1 as Latte
PlasmaComponents.Page { PlasmaComponents.Page {
Layout.maximumWidth: content.width + units.smallSpacing * 2 Layout.maximumWidth: content.width + content.Layout.leftMargin * 2
Layout.maximumHeight: content.height + units.smallSpacing * 2 Layout.maximumHeight: content.height + units.smallSpacing * 2
ColumnLayout { ColumnLayout {
id: content id: content
width: dialog.maxWidth - units.smallSpacing * 5 width: dialog.maxWidth - Layout.leftMargin * 2
spacing: units.largeSpacing spacing: units.largeSpacing
anchors.top: parent.top anchors.centerIn: parent
anchors.horizontalCenter: parent.horizontalCenter Layout.leftMargin: units.smallSpacing * 2
//! BEGIN: Applet Size //! BEGIN: Applet Size
ColumnLayout { ColumnLayout {
@ -52,6 +52,8 @@ PlasmaComponents.Page {
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: units.smallSpacing spacing: units.smallSpacing
PlasmaComponents.Slider { PlasmaComponents.Slider {
@ -82,7 +84,7 @@ PlasmaComponents.Page {
PlasmaComponents.Label { PlasmaComponents.Label {
text: appletsSizeSlider.value + " px." text: appletsSizeSlider.value + " px."
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 5 Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4
} }
} }
} }
@ -100,6 +102,8 @@ PlasmaComponents.Page {
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: units.smallSpacing spacing: units.smallSpacing
PlasmaComponents.Slider { PlasmaComponents.Slider {
@ -134,8 +138,7 @@ PlasmaComponents.Page {
text: Number( text: Number(
(zoomSlider.value * 100) - 100).toFixed(0) + "%" (zoomSlider.value * 100) - 100).toFixed(0) + "%"
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
Layout.minimumWidth: theme.mSize( Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4
theme.defaultFont).width * 5
} }
} }
} }
@ -152,6 +155,8 @@ PlasmaComponents.Page {
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 2 spacing: 2
property int duration: plasmoid.configuration.durationTime property int duration: plasmoid.configuration.durationTime
@ -215,7 +220,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox { PlasmaComponents.CheckBox {
id: showBackground id: showBackground
Layout.leftMargin: units.smallSpacing Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show Panel Background") text: i18n("Show Panel Background")
checked: plasmoid.configuration.useThemePanel checked: plasmoid.configuration.useThemePanel
@ -226,6 +231,8 @@ PlasmaComponents.Page {
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
PlasmaComponents.Slider { PlasmaComponents.Slider {
id: panelSizeSlider id: panelSizeSlider
@ -255,7 +262,7 @@ PlasmaComponents.Page {
enabled: showBackground.checked enabled: showBackground.checked
text: panelSizeSlider.value + " px." text: panelSizeSlider.value + " px."
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 5 Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4
} }
} }
} }
@ -270,35 +277,44 @@ PlasmaComponents.Page {
text: i18n("Shadows") text: i18n("Shadows")
} }
PlasmaComponents.ButtonRow { RowLayout{
Layout.fillWidth: true Layout.fillWidth: true
spacing: units.smallSpacing
exclusive: true
property int shadows: plasmoid.configuration.shadows
onCheckedButtonChanged: { Item{
if (checkedButton.checked) width: units.smallSpacing / 2
plasmoid.configuration.shadows = checkedButton.shadow
} }
PlasmaComponents.RadioButton { PlasmaComponents.ButtonRow {
text: i18n("None") Layout.fillWidth: true
checked: parent.shadows === shadow
readonly property int shadow: 0 spacing: units.smallSpacing
} exclusive: true
PlasmaComponents.RadioButton {
text: i18n("Only for locked applets")
checked: parent.shadows === shadow
readonly property int shadow: 1 property int shadows: plasmoid.configuration.shadows
}
PlasmaComponents.RadioButton { onCheckedButtonChanged: {
text: i18n("All applets") if (checkedButton.checked)
checked: parent.shadows === shadow plasmoid.configuration.shadows = checkedButton.shadow
}
PlasmaComponents.RadioButton {
text: i18n("None")
checked: parent.shadows === shadow
readonly property int shadow: 0
}
PlasmaComponents.RadioButton {
text: i18n("Only for locked applets")
checked: parent.shadows === shadow
readonly property int shadow: 2 readonly property int shadow: 1
}
PlasmaComponents.RadioButton {
text: i18n("All applets")
checked: parent.shadows === shadow
readonly property int shadow: 2
}
} }
} }
} }

@ -31,16 +31,16 @@ import org.kde.latte 0.1 as Latte
import "../controls" as ExtraControls import "../controls" as ExtraControls
PlasmaComponents.Page { PlasmaComponents.Page {
Layout.maximumWidth: content.width + units.smallSpacing * 2 Layout.maximumWidth: content.width + content.Layout.leftMargin * 2
Layout.maximumHeight: content.height + units.smallSpacing * 2 Layout.maximumHeight: content.height + units.smallSpacing * 2
ColumnLayout { ColumnLayout {
id: content id: content
width: dialog.maxWidth - units.smallSpacing * 5 width: dialog.maxWidth - Layout.leftMargin * 2
spacing: units.largeSpacing spacing: units.largeSpacing
anchors.top: parent.top anchors.centerIn: parent
anchors.horizontalCenter: parent.horizontalCenter Layout.leftMargin: units.smallSpacing * 2
//! BEGIN: Location //! BEGIN: Location
ColumnLayout { ColumnLayout {
@ -54,6 +54,8 @@ PlasmaComponents.Page {
RowLayout { RowLayout {
id: locationLayout id: locationLayout
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 1 spacing: 1
property int docksCount: dock.docksCount property int docksCount: dock.docksCount
@ -148,6 +150,8 @@ PlasmaComponents.Page {
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 1 spacing: 1
property int panelPosition: plasmoid.configuration.panelPosition property int panelPosition: plasmoid.configuration.panelPosition
@ -232,6 +236,8 @@ PlasmaComponents.Page {
width: parent.width width: parent.width
rowSpacing: 1 rowSpacing: 1
columnSpacing: 1 columnSpacing: 1
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
columns: 2 columns: 2
@ -308,6 +314,8 @@ PlasmaComponents.Page {
RowLayout { RowLayout {
Layout.fillWidth: false Layout.fillWidth: false
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
spacing: units.smallSpacing spacing: units.smallSpacing

@ -29,16 +29,16 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.1 as Latte import org.kde.latte 0.1 as Latte
PlasmaComponents.Page { PlasmaComponents.Page {
Layout.maximumWidth: content.width + units.smallSpacing * 2 Layout.maximumWidth: content.width + content.Layout.leftMargin * 2
Layout.maximumHeight: content.height + units.smallSpacing * 2 Layout.maximumHeight: content.height + units.smallSpacing * 2
ColumnLayout { ColumnLayout {
id: content id: content
width: dialog.maxWidth - units.smallSpacing * 5 width: dialog.maxWidth - Layout.leftMargin * 2
spacing: units.largeSpacing spacing: units.largeSpacing
anchors.top: parent.top anchors.centerIn: parent
anchors.horizontalCenter: parent.horizontalCenter Layout.leftMargin: units.smallSpacing * 2
//! BEGIN: Tasks Appearance //! BEGIN: Tasks Appearance
ColumnLayout { ColumnLayout {
@ -50,7 +50,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox { PlasmaComponents.CheckBox {
id: showGlow id: showGlow
Layout.leftMargin: units.smallSpacing * 4 Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show glow around windows points") text: i18n("Show glow around windows points")
checked: plasmoid.configuration.showGlow checked: plasmoid.configuration.showGlow
@ -61,7 +61,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox { PlasmaComponents.CheckBox {
id: threeColorsWindows id: threeColorsWindows
Layout.leftMargin: units.smallSpacing * 4 Layout.leftMargin: units.smallSpacing * 2
text: i18n("Different color for minimized windows") text: i18n("Different color for minimized windows")
checked: plasmoid.configuration.threeColorsWindows checked: plasmoid.configuration.threeColorsWindows
@ -72,7 +72,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox { PlasmaComponents.CheckBox {
id: dotsOnActive id: dotsOnActive
Layout.leftMargin: units.smallSpacing * 4 Layout.leftMargin: units.smallSpacing * 2
text: i18n("Dots on active window") text: i18n("Dots on active window")
checked: plasmoid.configuration.dotsOnActive checked: plasmoid.configuration.dotsOnActive
@ -83,7 +83,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox { PlasmaComponents.CheckBox {
id: reverseLinesPosition id: reverseLinesPosition
Layout.leftMargin: units.smallSpacing * 4 Layout.leftMargin: units.smallSpacing * 2
text: i18n("Reverse position for lines and dots") text: i18n("Reverse position for lines and dots")
checked: plasmoid.configuration.reverseLinesPosition checked: plasmoid.configuration.reverseLinesPosition
@ -104,7 +104,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox { PlasmaComponents.CheckBox {
id: showPreviewsChk id: showPreviewsChk
Layout.leftMargin: units.smallSpacing * 4 Layout.leftMargin: units.smallSpacing * 2
text: i18n("Preview windows on hovering") text: i18n("Preview windows on hovering")
checked: plasmoid.configuration.showToolTips checked: plasmoid.configuration.showToolTips
@ -115,7 +115,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox { PlasmaComponents.CheckBox {
id: highlightWindowsChk id: highlightWindowsChk
Layout.leftMargin: units.smallSpacing * 4 Layout.leftMargin: units.smallSpacing * 2
text: i18n("Highlight windows on hovering") text: i18n("Highlight windows on hovering")
checked: plasmoid.configuration.highlightWindows checked: plasmoid.configuration.highlightWindows
@ -126,7 +126,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox { PlasmaComponents.CheckBox {
id: windowActionsChk id: windowActionsChk
Layout.leftMargin: units.smallSpacing * 4 Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show window actions in the context menu") text: i18n("Show window actions in the context menu")
checked: plasmoid.configuration.showWindowActions checked: plasmoid.configuration.showWindowActions
@ -137,7 +137,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox { PlasmaComponents.CheckBox {
id: smartLaunchersChk id: smartLaunchersChk
Layout.leftMargin: units.smallSpacing * 4 Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show progress information in task buttons") text: i18n("Show progress information in task buttons")
checked: plasmoid.configuration.smartLaunchersEnabled checked: plasmoid.configuration.smartLaunchersEnabled
@ -158,7 +158,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox { PlasmaComponents.CheckBox {
id: showOnlyCurrentScreen id: showOnlyCurrentScreen
Layout.leftMargin: units.smallSpacing * 4 Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from the current screen") text: i18n("Show only tasks from the current screen")
checked: plasmoid.configuration.showOnlyCurrentScreen checked: plasmoid.configuration.showOnlyCurrentScreen
@ -169,7 +169,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox { PlasmaComponents.CheckBox {
id: showOnlyCurrentDesktop id: showOnlyCurrentDesktop
Layout.leftMargin: units.smallSpacing * 4 Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from the current desktop") text: i18n("Show only tasks from the current desktop")
checked: plasmoid.configuration.showOnlyCurrentDesktop checked: plasmoid.configuration.showOnlyCurrentDesktop
@ -180,7 +180,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox { PlasmaComponents.CheckBox {
id: showOnlyCurrentActivity id: showOnlyCurrentActivity
Layout.leftMargin: units.smallSpacing * 4 Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show only tasks from the current activity") text: i18n("Show only tasks from the current activity")
checked: plasmoid.configuration.showOnlyCurrentActivity checked: plasmoid.configuration.showOnlyCurrentActivity

Loading…
Cancel
Save