Add NWidgetCard, fix some BarTab things
This commit is contained in:
commit
32c9328684
7 changed files with 38 additions and 41 deletions
|
|
@ -1,19 +1,19 @@
|
||||||
{
|
{
|
||||||
"dark": {
|
"dark": {
|
||||||
"mPrimary": "#ebbcba",
|
"mPrimary": "#ebbcba",
|
||||||
"mOnPrimary": "#191724",
|
"mOnPrimary": "#1f1d2e",
|
||||||
"mSecondary": "#9ccfd8",
|
"mSecondary": "#9ccfd8",
|
||||||
"mOnSecondary": "#191724",
|
"mOnSecondary": "#1f1d2e",
|
||||||
"mTertiary": "#f6c177",
|
"mTertiary": "#f6c177",
|
||||||
"mOnTertiary": "#191724",
|
"mOnTertiary": "#1f1d2e",
|
||||||
"mError": "#eb6f92",
|
"mError": "#eb6f92",
|
||||||
"mOnError": "#1f1d2e",
|
"mOnError": "#1f1d2e",
|
||||||
"mSurface": "#191724",
|
"mSurface": "#1f1d2e",
|
||||||
"mOnSurface": "#e0def4",
|
"mOnSurface": "#e0def4",
|
||||||
"mSurfaceVariant": "#26233a",
|
"mSurfaceVariant": "#26233a",
|
||||||
"mOnSurfaceVariant": "#908caa",
|
"mOnSurfaceVariant": "#908caa",
|
||||||
"mOutline": "#403d52",
|
"mOutline": "#403d52",
|
||||||
"mShadow": "#191724"
|
"mShadow": "#1f1d2e"
|
||||||
},
|
},
|
||||||
"light": {
|
"light": {
|
||||||
"mPrimary": "#d46e6b",
|
"mPrimary": "#d46e6b",
|
||||||
|
|
|
||||||
|
|
@ -121,14 +121,12 @@ Singleton {
|
||||||
bar: JsonObject {
|
bar: JsonObject {
|
||||||
property string position: "top" // Possible values: "top", "bottom"
|
property string position: "top" // Possible values: "top", "bottom"
|
||||||
property bool showActiveWindowIcon: true
|
property bool showActiveWindowIcon: true
|
||||||
|
|
||||||
property bool alwaysShowBatteryPercentage: false
|
property bool alwaysShowBatteryPercentage: false
|
||||||
property real backgroundOpacity: 1.0
|
property real backgroundOpacity: 1.0
|
||||||
property list<string> monitors: []
|
property list<string> monitors: []
|
||||||
|
|
||||||
// Widget configuration for modular bar system
|
// Widget configuration for modular bar system
|
||||||
property JsonObject widgets
|
property JsonObject widgets
|
||||||
|
|
||||||
widgets: JsonObject {
|
widgets: JsonObject {
|
||||||
property list<string> left: ["SystemMonitor", "ActiveWindow", "MediaMini"]
|
property list<string> left: ["SystemMonitor", "ActiveWindow", "MediaMini"]
|
||||||
property list<string> center: ["Workspace"]
|
property list<string> center: ["Workspace"]
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Row {
|
||||||
id: root
|
id: root
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
spacing: Style.marginS * scaling
|
spacing: Style.marginS * scaling
|
||||||
visible: (Settings.data.bar.showActiveWindow && getTitle() !== "")
|
visible: getTitle() !== ""
|
||||||
|
|
||||||
property bool showingFullTitle: false
|
property bool showingFullTitle: false
|
||||||
property int lastWindowIndex: -1
|
property int lastWindowIndex: -1
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import qs.Widgets
|
||||||
NIconButton {
|
NIconButton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
visible: Settings.data.bar.showNotificationsHistory
|
|
||||||
sizeMultiplier: 0.8
|
sizeMultiplier: 0.8
|
||||||
icon: "notifications"
|
icon: "notifications"
|
||||||
tooltipText: "Notification History"
|
tooltipText: "Notification History"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ Row {
|
||||||
id: root
|
id: root
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
spacing: Style.marginS * scaling
|
spacing: Style.marginS * scaling
|
||||||
visible: (Settings.data.bar.showSystemInfo)
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
// Let the Rectangle size itself based on its content (the Row)
|
// Let the Rectangle size itself based on its content (the Row)
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,8 @@ import qs.Widgets
|
||||||
Rectangle {
|
Rectangle {
|
||||||
readonly property real itemSize: 24 * scaling
|
readonly property real itemSize: 24 * scaling
|
||||||
|
|
||||||
visible: Settings.data.bar.showTray && (SystemTray.items.values.length > 0)
|
visible: SystemTray.items.values.length > 0
|
||||||
|
|
||||||
width: tray.width + Style.marginM * scaling * 2
|
width: tray.width + Style.marginM * scaling * 2
|
||||||
|
|
||||||
height: Math.round(Style.capsuleHeight * scaling)
|
height: Math.round(Style.capsuleHeight * scaling)
|
||||||
radius: Math.round(Style.radiusM * scaling)
|
radius: Math.round(Style.radiusM * scaling)
|
||||||
color: Color.mSurfaceVariant
|
color: Color.mSurfaceVariant
|
||||||
|
|
|
||||||
|
|
@ -33,12 +33,6 @@ ColumnLayout {
|
||||||
spacing: Style.marginL * scaling
|
spacing: Style.marginL * scaling
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
NText {
|
|
||||||
text: "Bar & Widgets"
|
|
||||||
font.pointSize: Style.fontSizeXXL * scaling
|
|
||||||
font.weight: Style.fontWeightBold
|
|
||||||
color: Color.mOnSurface
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: Style.marginXXS * scaling
|
spacing: Style.marginXXS * scaling
|
||||||
|
|
@ -78,25 +72,7 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NToggle {
|
ColumnLayout {
|
||||||
label: "Show Active Window's Icon"
|
|
||||||
description: "Display the app icon next to the title of the currently focused window."
|
|
||||||
checked: Settings.data.bar.showActiveWindowIcon
|
|
||||||
onToggled: checked => {
|
|
||||||
Settings.data.bar.showActiveWindowIcon = checked
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NToggle {
|
|
||||||
label: "Show Battery Percentage"
|
|
||||||
description: "Show battery percentage at all times."
|
|
||||||
checked: Settings.data.bar.alwaysShowBatteryPercentage
|
|
||||||
onToggled: checked => {
|
|
||||||
Settings.data.bar.alwaysShowBatteryPercentage = checked
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: Style.marginXXS * scaling
|
spacing: Style.marginXXS * scaling
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
|
@ -135,20 +111,46 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Widget Management Section
|
|
||||||
|
NToggle {
|
||||||
|
label: "Show Active Window's Icon"
|
||||||
|
description: "Display the app icon next to the title of the currently focused window."
|
||||||
|
checked: Settings.data.bar.showActiveWindowIcon
|
||||||
|
onToggled: checked => {
|
||||||
|
Settings.data.bar.showActiveWindowIcon = checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
NToggle {
|
||||||
|
label: "Show Battery Percentage"
|
||||||
|
description: "Show battery percentage at all times."
|
||||||
|
checked: Settings.data.bar.alwaysShowBatteryPercentage
|
||||||
|
onToggled: checked => {
|
||||||
|
Settings.data.bar.alwaysShowBatteryPercentage = checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
NDivider {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: Style.marginL * scaling
|
||||||
|
Layout.bottomMargin: Style.marginL * scaling
|
||||||
|
}
|
||||||
|
|
||||||
|
// Widgets Management Section
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: Style.marginXXS * scaling
|
spacing: Style.marginXXS * scaling
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
text: "Widget Management"
|
text: "Widgets Positioning"
|
||||||
font.pointSize: Style.fontSizeL * scaling
|
font.pointSize: Style.fontSizeL * scaling
|
||||||
font.weight: Style.fontWeightBold
|
font.weight: Style.fontWeightBold
|
||||||
color: Color.mOnSurface
|
color: Color.mOnSurface
|
||||||
}
|
}
|
||||||
|
|
||||||
NText {
|
NText {
|
||||||
text: "Configure which widgets appear in each section of the bar. Use the arrow buttons to reorder widgets, or the add/remove buttons to manage them."
|
text: "Add, remove, or reorder widgets in each section of the bar using the control buttons."
|
||||||
font.pointSize: Style.fontSizeXS * scaling
|
font.pointSize: Style.fontSizeXS * scaling
|
||||||
color: Color.mOnSurfaceVariant
|
color: Color.mOnSurfaceVariant
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
|
|
@ -159,6 +161,7 @@ ColumnLayout {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
Layout.topMargin: Style.marginM * scaling
|
||||||
spacing: Style.marginM * scaling
|
spacing: Style.marginM * scaling
|
||||||
|
|
||||||
// Left Section
|
// Left Section
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue