mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-05-29 17:12:04 +00:00
Merge branch 'bootstrap-icons' of https://github.com/noctalia-dev/noctalia-shell into bootstrap-icons
This commit is contained in:
@@ -33,16 +33,18 @@ RowLayout {
|
||||
|
||||
readonly property bool showIcon: (widgetSettings.showIcon !== undefined) ? widgetSettings.showIcon : widgetMetadata.showIcon
|
||||
|
||||
readonly property real minWidth: 160
|
||||
readonly property real maxWidth: 400
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
spacing: Style.marginS * scaling
|
||||
visible: getTitle() !== ""
|
||||
// 6% of total width
|
||||
readonly property real minWidth: Math.max(1, screen.width * 0.06)
|
||||
readonly property real maxWidth: minWidth * 2
|
||||
|
||||
function getTitle() {
|
||||
return CompositorService.focusedWindowTitle !== "(No active window)" ? CompositorService.focusedWindowTitle : ""
|
||||
}
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
spacing: Style.marginS * scaling
|
||||
visible: getTitle() !== ""
|
||||
|
||||
function getAppIcon() {
|
||||
// Try CompositorService first
|
||||
const focusedWindow = CompositorService.getFocusedWindow()
|
||||
|
||||
@@ -38,8 +38,9 @@ RowLayout {
|
||||
readonly property string visualizerType: (widgetSettings.visualizerType !== undefined && widgetSettings.visualizerType
|
||||
!== "") ? widgetSettings.visualizerType : widgetMetadata.visualizerType
|
||||
|
||||
readonly property real minWidth: 160
|
||||
readonly property real maxWidth: 400
|
||||
// 6% of total width
|
||||
readonly property real minWidth: Math.max(1, screen.width * 0.06)
|
||||
readonly property real maxWidth: minWidth * 2
|
||||
|
||||
function getTitle() {
|
||||
return MediaService.trackTitle + (MediaService.trackArtist !== "" ? ` - ${MediaService.trackArtist}` : "")
|
||||
|
||||
@@ -40,7 +40,7 @@ Rectangle {
|
||||
|
||||
NIcon {
|
||||
icon: root.icon
|
||||
font.pointSize: Style.fontSizeM * scaling
|
||||
font.pointSize: Math.max(1, root.width * 0.4)
|
||||
color: root.enabled && root.hovering ? colorFgHover : colorFg
|
||||
// Center horizontally
|
||||
x: (root.width - width) / 2
|
||||
|
||||
Reference in New Issue
Block a user