mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-06 20:12:29 +00:00
ControlCenter: Looks better when it's taller and less wide.
This commit is contained in:
@@ -9,14 +9,11 @@ import qs.Widgets
|
|||||||
NBox {
|
NBox {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
GridLayout {
|
RowLayout {
|
||||||
id: content
|
id: content
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Style.marginXS * scaling
|
anchors.margins: Style.marginXS * scaling
|
||||||
columns: 2
|
spacing: Style.marginS * scaling
|
||||||
rows: 2
|
|
||||||
columnSpacing: Style.marginS * scaling
|
|
||||||
rowSpacing: Style.marginS * scaling
|
|
||||||
|
|
||||||
NCircleStat {
|
NCircleStat {
|
||||||
value: SystemStatService.cpuUsage
|
value: SystemStatService.cpuUsage
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ NBox {
|
|||||||
GridLayout {
|
GridLayout {
|
||||||
id: grid
|
id: grid
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
columns: (Settings.data.controlCenter.quickSettingsStyle === "compact") ? 5 : 3
|
columns: (Settings.data.controlCenter.quickSettingsStyle === "compact") ? 4 : 3
|
||||||
columnSpacing: Style.marginM * scaling
|
columnSpacing: Style.marginM * scaling
|
||||||
rowSpacing: Style.marginS * scaling
|
rowSpacing: Style.marginS * scaling
|
||||||
|
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ import qs.Widgets
|
|||||||
NPanel {
|
NPanel {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
preferredWidth: 440
|
preferredWidth: 400
|
||||||
preferredHeight: topHeight + bottomHeight + Math.round(Style.marginL * 3)
|
preferredHeight: topHeight + midHeight + bottomHeight + Math.round(Style.marginL * 4)
|
||||||
panelKeyboardFocus: true
|
panelKeyboardFocus: true
|
||||||
|
|
||||||
readonly property int bottomHeight: 196
|
|
||||||
readonly property int topHeight: {
|
readonly property int topHeight: {
|
||||||
const columns = (Settings.data.controlCenter.quickSettingsStyle === "compact") ? 5 : 3
|
const columns = (Settings.data.controlCenter.quickSettingsStyle === "compact") ? 4 : 3
|
||||||
const rowsCount = Math.ceil(Settings.data.controlCenter.widgets.quickSettings.length / columns)
|
const rowsCount = Math.ceil(Settings.data.controlCenter.widgets.quickSettings.length / columns)
|
||||||
|
|
||||||
var buttonHeight
|
var buttonHeight
|
||||||
@@ -30,6 +30,9 @@ NPanel {
|
|||||||
|
|
||||||
return (rowsCount * buttonHeight) + 120
|
return (rowsCount * buttonHeight) + 120
|
||||||
}
|
}
|
||||||
|
readonly property int midHeight: 220
|
||||||
|
readonly property int bottomHeight: 80
|
||||||
|
|
||||||
|
|
||||||
// Positioning
|
// Positioning
|
||||||
readonly property string controlCenterPosition: Settings.data.controlCenter.position
|
readonly property string controlCenterPosition: Settings.data.controlCenter.position
|
||||||
@@ -59,24 +62,16 @@ NPanel {
|
|||||||
Layout.preferredHeight: topHeight * scaling
|
Layout.preferredHeight: topHeight * scaling
|
||||||
}
|
}
|
||||||
|
|
||||||
// Media + stats column
|
// Media card
|
||||||
RowLayout {
|
MediaCard {
|
||||||
id: bottomCard
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: midHeight * scaling
|
||||||
|
}
|
||||||
|
|
||||||
|
// System monitors combined in one card
|
||||||
|
SystemMonitorCard {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: bottomHeight * scaling
|
Layout.preferredHeight: bottomHeight * scaling
|
||||||
spacing: content.cardSpacing
|
|
||||||
|
|
||||||
// Media card
|
|
||||||
MediaCard {
|
|
||||||
Layout.preferredWidth: Math.max(250 * scaling)
|
|
||||||
Layout.preferredHeight: bottomHeight * scaling
|
|
||||||
}
|
|
||||||
|
|
||||||
// System monitors combined in one card
|
|
||||||
SystemMonitorCard {
|
|
||||||
Layout.preferredWidth: Math.max(140 * scaling)
|
|
||||||
Layout.preferredHeight: bottomHeight * scaling
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user