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
PlasmaComponents.Page {
Layout.maximumWidth: content.width + units.smallSpacing * 2
Layout.maximumWidth: content.width + content.Layout.leftMargin * 2
Layout.maximumHeight: content.height + units.smallSpacing * 2
ColumnLayout {
id: content
width: dialog.maxWidth - units.smallSpacing * 5
width: dialog.maxWidth - Layout.leftMargin * 2
spacing: units.largeSpacing
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
anchors.centerIn: parent
Layout.leftMargin: units.smallSpacing * 2
//! BEGIN: Applet Size
ColumnLayout {
@ -52,6 +52,8 @@ PlasmaComponents.Page {
RowLayout {
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: units.smallSpacing
PlasmaComponents.Slider {
@ -74,15 +76,15 @@ PlasmaComponents.Page {
updateIconSize()
}
Component.onCompleted: {
valueChanged.connect(updateIconSize)
Component.onCompleted: {
valueChanged.connect(updateIconSize)
}
}
PlasmaComponents.Label {
text: appletsSizeSlider.value + " px."
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 {
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: units.smallSpacing
PlasmaComponents.Slider {
@ -126,7 +130,7 @@ PlasmaComponents.Page {
}
Component.onCompleted: {
valueChanged.connect(updateZoomLevel)
valueChanged.connect(updateZoomLevel)
}
}
@ -134,8 +138,7 @@ PlasmaComponents.Page {
text: Number(
(zoomSlider.value * 100) - 100).toFixed(0) + "%"
horizontalAlignment: Text.AlignRight
Layout.minimumWidth: theme.mSize(
theme.defaultFont).width * 5
Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4
}
}
}
@ -152,6 +155,8 @@ PlasmaComponents.Page {
RowLayout {
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 2
property int duration: plasmoid.configuration.durationTime
@ -215,7 +220,7 @@ PlasmaComponents.Page {
PlasmaComponents.CheckBox {
id: showBackground
Layout.leftMargin: units.smallSpacing
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Show Panel Background")
checked: plasmoid.configuration.useThemePanel
@ -226,6 +231,8 @@ PlasmaComponents.Page {
RowLayout {
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
PlasmaComponents.Slider {
id: panelSizeSlider
@ -255,7 +262,7 @@ PlasmaComponents.Page {
enabled: showBackground.checked
text: panelSizeSlider.value + " px."
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")
}
PlasmaComponents.ButtonRow {
RowLayout{
Layout.fillWidth: true
spacing: units.smallSpacing
exclusive: true
property int shadows: plasmoid.configuration.shadows
onCheckedButtonChanged: {
if (checkedButton.checked)
plasmoid.configuration.shadows = checkedButton.shadow
Item{
width: units.smallSpacing / 2
}
PlasmaComponents.RadioButton {
text: i18n("None")
checked: parent.shadows === shadow
PlasmaComponents.ButtonRow {
Layout.fillWidth: true
readonly property int shadow: 0
}
PlasmaComponents.RadioButton {
text: i18n("Only for locked applets")
checked: parent.shadows === shadow
spacing: units.smallSpacing
exclusive: true
readonly property int shadow: 1
}
PlasmaComponents.RadioButton {
text: i18n("All applets")
checked: parent.shadows === shadow
property int shadows: plasmoid.configuration.shadows
readonly property int shadow: 2
onCheckedButtonChanged: {
if (checkedButton.checked)
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: 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
PlasmaComponents.Page {
Layout.maximumWidth: content.width + units.smallSpacing * 2
Layout.maximumWidth: content.width + content.Layout.leftMargin * 2
Layout.maximumHeight: content.height + units.smallSpacing * 2
ColumnLayout {
id: content
width: dialog.maxWidth - units.smallSpacing * 5
width: dialog.maxWidth - Layout.leftMargin * 2
spacing: units.largeSpacing
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
anchors.centerIn: parent
Layout.leftMargin: units.smallSpacing * 2
//! BEGIN: Location
ColumnLayout {
@ -54,6 +54,8 @@ PlasmaComponents.Page {
RowLayout {
id: locationLayout
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 1
property int docksCount: dock.docksCount
@ -148,6 +150,8 @@ PlasmaComponents.Page {
RowLayout {
Layout.fillWidth: true
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
spacing: 1
property int panelPosition: plasmoid.configuration.panelPosition
@ -232,6 +236,8 @@ PlasmaComponents.Page {
width: parent.width
rowSpacing: 1
columnSpacing: 1
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
columns: 2
@ -308,6 +314,8 @@ PlasmaComponents.Page {
RowLayout {
Layout.fillWidth: false
Layout.leftMargin: units.smallSpacing * 2
Layout.rightMargin: units.smallSpacing * 2
Layout.alignment: Qt.AlignHCenter
spacing: units.smallSpacing

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

Loading…
Cancel
Save