Merge branch 'bootstrap-icons' of https://github.com/noctalia-dev/noctalia-shell into bootstrap-icons
This commit is contained in:
commit
ee44920fa4
3 changed files with 11 additions and 8 deletions
|
|
@ -33,16 +33,18 @@ RowLayout {
|
||||||
|
|
||||||
readonly property bool showIcon: (widgetSettings.showIcon !== undefined) ? widgetSettings.showIcon : widgetMetadata.showIcon
|
readonly property bool showIcon: (widgetSettings.showIcon !== undefined) ? widgetSettings.showIcon : widgetMetadata.showIcon
|
||||||
|
|
||||||
readonly property real minWidth: 160
|
// 6% of total width
|
||||||
readonly property real maxWidth: 400
|
readonly property real minWidth: Math.max(1, screen.width * 0.06)
|
||||||
Layout.alignment: Qt.AlignVCenter
|
readonly property real maxWidth: minWidth * 2
|
||||||
spacing: Style.marginS * scaling
|
|
||||||
visible: getTitle() !== ""
|
|
||||||
|
|
||||||
function getTitle() {
|
function getTitle() {
|
||||||
return CompositorService.focusedWindowTitle !== "(No active window)" ? CompositorService.focusedWindowTitle : ""
|
return CompositorService.focusedWindowTitle !== "(No active window)" ? CompositorService.focusedWindowTitle : ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
spacing: Style.marginS * scaling
|
||||||
|
visible: getTitle() !== ""
|
||||||
|
|
||||||
function getAppIcon() {
|
function getAppIcon() {
|
||||||
// Try CompositorService first
|
// Try CompositorService first
|
||||||
const focusedWindow = CompositorService.getFocusedWindow()
|
const focusedWindow = CompositorService.getFocusedWindow()
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,9 @@ RowLayout {
|
||||||
readonly property string visualizerType: (widgetSettings.visualizerType !== undefined && widgetSettings.visualizerType
|
readonly property string visualizerType: (widgetSettings.visualizerType !== undefined && widgetSettings.visualizerType
|
||||||
!== "") ? widgetSettings.visualizerType : widgetMetadata.visualizerType
|
!== "") ? widgetSettings.visualizerType : widgetMetadata.visualizerType
|
||||||
|
|
||||||
readonly property real minWidth: 160
|
// 6% of total width
|
||||||
readonly property real maxWidth: 400
|
readonly property real minWidth: Math.max(1, screen.width * 0.06)
|
||||||
|
readonly property real maxWidth: minWidth * 2
|
||||||
|
|
||||||
function getTitle() {
|
function getTitle() {
|
||||||
return MediaService.trackTitle + (MediaService.trackArtist !== "" ? ` - ${MediaService.trackArtist}` : "")
|
return MediaService.trackTitle + (MediaService.trackArtist !== "" ? ` - ${MediaService.trackArtist}` : "")
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ Rectangle {
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: root.icon
|
icon: root.icon
|
||||||
font.pointSize: Style.fontSizeM * scaling
|
font.pointSize: Math.max(1, root.width * 0.4)
|
||||||
color: root.enabled && root.hovering ? colorFgHover : colorFg
|
color: root.enabled && root.hovering ? colorFgHover : colorFg
|
||||||
// Center horizontally
|
// Center horizontally
|
||||||
x: (root.width - width) / 2
|
x: (root.width - width) / 2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue