ActiveWindow: added more breathing room and a little oultine
This commit is contained in:
parent
4f4c22baf9
commit
a465872e0d
1 changed files with 48 additions and 32 deletions
|
|
@ -101,46 +101,62 @@ PanelWindow {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: activeWindowTitleContainer
|
id: activeWindowTitleContainer
|
||||||
color: Theme.backgroundPrimary
|
color: "transparent"
|
||||||
bottomLeftRadius: Math.max(0, width / 2)
|
|
||||||
bottomRightRadius: Math.max(0, width / 2)
|
|
||||||
|
|
||||||
width: Math.min(barBackground.width - 200, activeWindowTitle.implicitWidth + (Settings.settings.showActiveWindowIcon ? 28 : 22))
|
|
||||||
|
width: Math.min(barBackground.width - 200, activeWindowTitle.implicitWidth + (Settings.settings.showActiveWindowIcon ? 28 : 22)) + 16
|
||||||
height: activeWindowTitle.implicitHeight + 12
|
height: activeWindowTitle.implicitHeight + 12
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
IconImage {
|
Rectangle {
|
||||||
id: icon
|
id: innerRect
|
||||||
width: 12
|
|
||||||
height: 12
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 6
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
source: ToplevelManager?.activeToplevel ? getIcon() : ""
|
|
||||||
visible: Settings.settings.showActiveWindowIcon
|
|
||||||
anchors.verticalCenterOffset: -3
|
|
||||||
|
|
||||||
|
bottomLeftRadius: Math.max(0, width / 2)
|
||||||
|
bottomRightRadius: Math.max(0, width / 2)
|
||||||
|
color: Theme.backgroundSecondary
|
||||||
|
anchors {
|
||||||
|
fill: parent
|
||||||
|
leftMargin: 0
|
||||||
|
rightMargin: 0
|
||||||
|
topMargin: -1
|
||||||
|
bottomMargin: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
border.color: Theme.outline || "#444";
|
||||||
|
border.width: 1;
|
||||||
|
|
||||||
|
IconImage {
|
||||||
|
id: icon
|
||||||
|
width: 12
|
||||||
|
height: 12
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 14
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
source: ToplevelManager?.activeToplevel ? getIcon() : ""
|
||||||
|
visible: Settings.settings.showActiveWindowIcon
|
||||||
|
anchors.verticalCenterOffset: -3
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: activeWindowTitle
|
||||||
|
text: ToplevelManager?.activeToplevel?.title && ToplevelManager?.activeToplevel?.title.length > 60 ? ToplevelManager?.activeToplevel?.title.substring(0, 60) + "..." : ToplevelManager?.activeToplevel?.title || ""
|
||||||
|
font.pixelSize: 12 * Theme.scale(Screen)
|
||||||
|
color: Theme.textSecondary
|
||||||
|
anchors.left: icon.right
|
||||||
|
anchors.leftMargin: Settings.settings.showActiveWindowIcon ? 4 : 6
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 14
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.verticalCenterOffset: -3
|
||||||
|
horizontalAlignment: Settings.settings.showActiveWindowIcon ? Text.AlignRight : Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
maximumLineCount: 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
|
||||||
id: activeWindowTitle
|
|
||||||
text: ToplevelManager?.activeToplevel?.title && ToplevelManager?.activeToplevel?.title.length > 60 ? ToplevelManager?.activeToplevel?.title.substring(0, 60) + "..." : ToplevelManager?.activeToplevel?.title || ""
|
|
||||||
font.pixelSize: 12 * Theme.scale(Screen)
|
|
||||||
color: Theme.textSecondary
|
|
||||||
anchors.left: icon.right
|
|
||||||
anchors.leftMargin: Settings.settings.showActiveWindowIcon ? 4 : 6
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: 6
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.verticalCenterOffset: -3
|
|
||||||
horizontalAlignment: Settings.settings.showActiveWindowIcon ? Text.AlignRight : Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
maximumLineCount: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue