mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-06 20:12:29 +00:00
Merge branch 'quick-settings' of https://github.com/noctalia-dev/noctalia-shell into quick-settings
This commit is contained in:
@@ -11,9 +11,24 @@ NPanel {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
preferredWidth: 440
|
preferredWidth: 440
|
||||||
preferredHeight: 540
|
preferredHeight: topHeight + bottomHeight + Math.round(Style.marginL * scaling * 3)
|
||||||
panelKeyboardFocus: true
|
panelKeyboardFocus: true
|
||||||
|
|
||||||
|
readonly property int bottomHeight: Math.round(Math.max(196 * scaling))
|
||||||
|
readonly property int topHeight: {
|
||||||
|
const rowsCount = Math.ceil(Settings.data.controlCenter.widgets.quickSettings.length / 3)
|
||||||
|
|
||||||
|
var buttonHeight;
|
||||||
|
if (Settings.data.controlCenter.quickSettingsStyle === "classic") {
|
||||||
|
buttonHeight = Style.baseWidgetSize
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
buttonHeight = 56
|
||||||
|
}
|
||||||
|
|
||||||
|
return (rowsCount * buttonHeight) + (120 * scaling)
|
||||||
|
}
|
||||||
|
|
||||||
// Positioning
|
// Positioning
|
||||||
readonly property string controlCenterPosition: Settings.data.controlCenter.position
|
readonly property string controlCenterPosition: Settings.data.controlCenter.position
|
||||||
panelAnchorHorizontalCenter: controlCenterPosition !== "close_to_bar_button" && controlCenterPosition.endsWith("_center")
|
panelAnchorHorizontalCenter: controlCenterPosition !== "close_to_bar_button" && controlCenterPosition.endsWith("_center")
|
||||||
@@ -37,26 +52,28 @@ NPanel {
|
|||||||
|
|
||||||
// Top Card: profile + utilities
|
// Top Card: profile + utilities
|
||||||
TopCard {
|
TopCard {
|
||||||
|
id: topCard
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: Math.max(230 * scaling)
|
Layout.preferredHeight: topHeight
|
||||||
}
|
}
|
||||||
|
|
||||||
// Media + stats column
|
// Media + stats column
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
id: bottomCard
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: Math.max(196 * scaling)
|
Layout.preferredHeight: bottomHeight
|
||||||
spacing: content.cardSpacing
|
spacing: content.cardSpacing
|
||||||
|
|
||||||
// Media card
|
// Media card
|
||||||
MediaCard {
|
MediaCard {
|
||||||
Layout.preferredWidth: Math.max(250 * scaling)
|
Layout.preferredWidth: Math.max(250 * scaling)
|
||||||
Layout.preferredHeight: Math.max(196 * scaling)
|
Layout.preferredHeight: bottomHeight
|
||||||
}
|
}
|
||||||
|
|
||||||
// System monitors combined in one card
|
// System monitors combined in one card
|
||||||
SystemMonitorCard {
|
SystemMonitorCard {
|
||||||
Layout.preferredWidth: Math.max(140 * scaling)
|
Layout.preferredWidth: Math.max(140 * scaling)
|
||||||
Layout.preferredHeight: Math.max(196 * scaling)
|
Layout.preferredHeight: bottomHeight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user