mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Same behavior for compact and mini
This commit is contained in:
@@ -86,7 +86,7 @@ Item {
|
||||
BarPill {
|
||||
id: pill
|
||||
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
rightOpen: BarService.getPillDirection(root)
|
||||
icon: testMode ? BatteryService.getIcon(testPercent, testCharging, true) : BatteryService.getIcon(percent, charging, isReady)
|
||||
text: (isReady || testMode) ? Math.round(percent) : "-"
|
||||
|
||||
@@ -13,7 +13,7 @@ NIconButton {
|
||||
property ShellScreen screen
|
||||
|
||||
baseSize: Style.capsuleHeight
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
colorBg: Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent
|
||||
colorFg: Color.mOnSurface
|
||||
colorBorder: Color.transparent
|
||||
|
||||
@@ -76,7 +76,7 @@ Item {
|
||||
BarPill {
|
||||
id: pill
|
||||
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
rightOpen: BarService.getPillDirection(root)
|
||||
icon: getIcon()
|
||||
autoHide: false // Important to be false so we can hover as long as we want
|
||||
|
||||
@@ -29,7 +29,7 @@ Rectangle {
|
||||
|
||||
readonly property string barPosition: Settings.data.bar.position
|
||||
readonly property bool isBarVertical: barPosition === "left" || barPosition === "right"
|
||||
readonly property bool compact: (Settings.data.bar.density === "compact")
|
||||
readonly property bool compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
|
||||
readonly property var now: Time.date
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ NIconButton {
|
||||
tooltipText: I18n.tr("tooltips.open-control-center")
|
||||
tooltipDirection: BarService.getTooltipDirection()
|
||||
baseSize: Style.capsuleHeight
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
|
||||
colorFg: Color.mOnSurface
|
||||
colorBgHover: useDistroLogo ? Color.mSurfaceVariant : Color.mTertiary
|
||||
|
||||
@@ -48,7 +48,7 @@ Item {
|
||||
rightOpen: BarService.getPillDirection(root)
|
||||
icon: customIcon
|
||||
text: _dynamicText
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
autoHide: false
|
||||
forceOpen: _dynamicText !== ""
|
||||
forceClose: false
|
||||
|
||||
@@ -11,7 +11,7 @@ NIconButton {
|
||||
icon: "dark-mode"
|
||||
tooltipText: Settings.data.colorSchemes.darkMode ? I18n.tr("tooltips.switch-to-light-mode") : I18n.tr("tooltips.switch-to-dark-mode")
|
||||
tooltipDirection: BarService.getTooltipDirection()
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
baseSize: Style.capsuleHeight
|
||||
colorBg: Settings.data.colorSchemes.darkMode ? (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent) : Color.mPrimary
|
||||
colorFg: Settings.data.colorSchemes.darkMode ? Color.mOnSurface : Color.mOnPrimary
|
||||
|
||||
@@ -11,7 +11,7 @@ NIconButton {
|
||||
property ShellScreen screen
|
||||
|
||||
baseSize: Style.capsuleHeight
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
icon: IdleInhibitorService.isInhibited ? "keep-awake-on" : "keep-awake-off"
|
||||
tooltipText: IdleInhibitorService.isInhibited ? I18n.tr("tooltips.disable-keep-awake") : I18n.tr("tooltips.enable-keep-awake")
|
||||
tooltipDirection: BarService.getTooltipDirection()
|
||||
|
||||
@@ -42,7 +42,7 @@ Item {
|
||||
id: pill
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
rightOpen: BarService.getPillDirection(root)
|
||||
icon: "keyboard"
|
||||
autoHide: false // Important to be false so we can hover as long as we want
|
||||
|
||||
@@ -30,7 +30,7 @@ Item {
|
||||
}
|
||||
|
||||
readonly property string barPosition: Settings.data.bar.position
|
||||
readonly property bool compact: (Settings.data.bar.density === "compact")
|
||||
readonly property bool compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
|
||||
readonly property bool autoHide: (widgetSettings.autoHide !== undefined) ? widgetSettings.autoHide : widgetMetadata.autoHide
|
||||
readonly property bool showAlbumArt: (widgetSettings.showAlbumArt !== undefined) ? widgetSettings.showAlbumArt : widgetMetadata.showAlbumArt
|
||||
|
||||
@@ -91,7 +91,7 @@ Item {
|
||||
|
||||
rightOpen: BarService.getPillDirection(root)
|
||||
icon: getIcon()
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
autoHide: false // Important to be false so we can hover as long as we want
|
||||
text: Math.round(AudioService.inputVolume * 100)
|
||||
suffix: "%"
|
||||
|
||||
@@ -13,7 +13,7 @@ NIconButton {
|
||||
|
||||
property ShellScreen screen
|
||||
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
baseSize: Style.capsuleHeight
|
||||
colorBg: Settings.data.nightLight.forced ? Color.mPrimary : (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
|
||||
colorFg: Settings.data.nightLight.forced ? Color.mOnPrimary : Color.mOnSurface
|
||||
|
||||
@@ -49,7 +49,7 @@ NIconButton {
|
||||
}
|
||||
|
||||
baseSize: Style.capsuleHeight
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
icon: Settings.data.notifications.doNotDisturb ? "bell-off" : "bell"
|
||||
tooltipText: Settings.data.notifications.doNotDisturb ? I18n.tr("tooltips.open-notification-history-disable-dnd") : I18n.tr("tooltips.open-notification-history-enable-dnd")
|
||||
tooltipDirection: BarService.getTooltipDirection()
|
||||
|
||||
@@ -19,7 +19,7 @@ NIconButton {
|
||||
"profile": PowerProfileService.getName()
|
||||
})
|
||||
tooltipDirection: BarService.getTooltipDirection()
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
colorBg: (PowerProfileService.profile === PowerProfile.Balanced) ? (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent) : Color.mPrimary
|
||||
colorFg: (PowerProfileService.profile === PowerProfile.Balanced) ? Color.mOnSurface : Color.mOnPrimary
|
||||
colorBorder: Color.transparent
|
||||
|
||||
@@ -12,7 +12,7 @@ NIconButton {
|
||||
icon: "camera-video"
|
||||
tooltipText: ScreenRecorderService.isRecording ? I18n.tr("tooltips.click-to-stop-recording") : I18n.tr("tooltips.click-to-start-recording")
|
||||
tooltipDirection: BarService.getTooltipDirection()
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
baseSize: Style.capsuleHeight
|
||||
colorBg: ScreenRecorderService.isRecording ? Color.mPrimary : (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
|
||||
colorFg: ScreenRecorderService.isRecording ? Color.mOnPrimary : Color.mOnSurface
|
||||
|
||||
@@ -10,7 +10,7 @@ NIconButton {
|
||||
|
||||
property ShellScreen screen
|
||||
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
baseSize: Style.capsuleHeight
|
||||
icon: "power"
|
||||
tooltipText: I18n.tr("tooltips.session-menu")
|
||||
|
||||
@@ -29,7 +29,7 @@ Rectangle {
|
||||
|
||||
readonly property string barPosition: Settings.data.bar.position
|
||||
readonly property bool isVertical: barPosition === "left" || barPosition === "right"
|
||||
readonly property bool compact: (Settings.data.bar.density === "compact")
|
||||
readonly property bool compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
|
||||
readonly property bool showCpuUsage: (widgetSettings.showCpuUsage !== undefined) ? widgetSettings.showCpuUsage : widgetMetadata.showCpuUsage
|
||||
readonly property bool showCpuTemp: (widgetSettings.showCpuTemp !== undefined) ? widgetSettings.showCpuTemp : widgetMetadata.showCpuTemp
|
||||
|
||||
@@ -20,7 +20,7 @@ Rectangle {
|
||||
property int sectionWidgetsCount: 0
|
||||
|
||||
readonly property bool isVerticalBar: Settings.data.bar.position === "left" || Settings.data.bar.position === "right"
|
||||
readonly property bool compact: (Settings.data.bar.density === "compact")
|
||||
readonly property bool compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
readonly property real itemSize: compact ? Style.capsuleHeight * 0.9 : Style.capsuleHeight * 0.8
|
||||
|
||||
property var widgetMetadata: BarWidgetRegistry.widgetMetadata[widgetId]
|
||||
|
||||
@@ -34,7 +34,7 @@ Rectangle {
|
||||
|
||||
readonly property string barPosition: Settings.data.bar.position
|
||||
readonly property bool isVertical: barPosition === "left" || barPosition === "right"
|
||||
readonly property bool compact: (Settings.data.bar.density === "compact")
|
||||
readonly property bool compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
property real itemSize: Math.round(Style.capsuleHeight * 0.65)
|
||||
property list<string> blacklist: widgetSettings.blacklist || widgetMetadata.blacklist || [] // Read from settings
|
||||
property var filteredItems: []
|
||||
|
||||
@@ -74,7 +74,7 @@ Item {
|
||||
BarPill {
|
||||
id: pill
|
||||
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
rightOpen: BarService.getPillDirection(root)
|
||||
icon: getIcon()
|
||||
autoHide: false // Important to be false so we can hover as long as we want
|
||||
|
||||
@@ -11,7 +11,7 @@ NIconButton {
|
||||
property ShellScreen screen
|
||||
|
||||
baseSize: Style.capsuleHeight
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
icon: "wallpaper-selector"
|
||||
tooltipText: I18n.tr("tooltips.open-wallpaper-selector")
|
||||
tooltipDirection: BarService.getTooltipDirection()
|
||||
|
||||
@@ -12,7 +12,7 @@ NIconButton {
|
||||
|
||||
property ShellScreen screen
|
||||
|
||||
compact: (Settings.data.bar.density === "compact")
|
||||
compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
baseSize: Style.capsuleHeight
|
||||
colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent)
|
||||
colorFg: Color.mOnSurface
|
||||
|
||||
@@ -33,7 +33,7 @@ Item {
|
||||
|
||||
readonly property string barPosition: Settings.data.bar.position
|
||||
readonly property bool isVertical: barPosition === "left" || barPosition === "right"
|
||||
readonly property bool compact: (Settings.data.bar.density === "compact")
|
||||
readonly property bool compact: (Settings.data.bar.density === "compact") || (Settings.data.bar.density === "mini")
|
||||
readonly property real baseDimensionRatio: {
|
||||
const b = compact ? 0.85 : 0.65
|
||||
if (widgetSettings.labelMode === "none") {
|
||||
|
||||
Reference in New Issue
Block a user