KeyboardLayout: fix language detection/parsing
Bar: add a tiny bit more spacing between widgets NHorizontalPill: fix layout MediaMini: set size to 0 if no media is playing
This commit is contained in:
parent
d41b59d563
commit
ccd7458ea3
4 changed files with 18 additions and 15 deletions
|
|
@ -13,8 +13,9 @@ QtObject {
|
||||||
"united states": "us",
|
"united states": "us",
|
||||||
"us english": "us",
|
"us english": "us",
|
||||||
"british": "gb",
|
"british": "gb",
|
||||||
"uk": "ua", // FIXED: Ukrainian language code should map to Ukraine
|
"uk": "ua",
|
||||||
"united kingdom": "gb",
|
"united kingdom"// FIXED: Ukrainian language code should map to Ukraine
|
||||||
|
: "gb",
|
||||||
"english (uk)": "gb",
|
"english (uk)": "gb",
|
||||||
"canadian": "ca",
|
"canadian": "ca",
|
||||||
"canada": "ca",
|
"canada": "ca",
|
||||||
|
|
@ -91,8 +92,9 @@ QtObject {
|
||||||
"slovak": "sk",
|
"slovak": "sk",
|
||||||
"slovenčina": "sk",
|
"slovenčina": "sk",
|
||||||
"slovakia": "sk",
|
"slovakia": "sk",
|
||||||
"uk": "ua", // Ukrainian language code
|
"uk": "ua",
|
||||||
"ukrainian": "ua",
|
"ukrainian"// Ukrainian language code
|
||||||
|
: "ua",
|
||||||
"українська": "ua",
|
"українська": "ua",
|
||||||
"ukraine": "ua",
|
"ukraine": "ua",
|
||||||
"bulgarian": "bg",
|
"bulgarian": "bg",
|
||||||
|
|
@ -200,4 +202,4 @@ QtObject {
|
||||||
"norman": "fr",
|
"norman": "fr",
|
||||||
"qwertz": "de"
|
"qwertz": "de"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
import Qt5Compat.GraphicalEffects
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
import Quickshell.Services.UPower
|
import Quickshell.Services.UPower
|
||||||
|
|
@ -57,7 +58,7 @@ Variants {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
// Background fill
|
// Background fill with shadow
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: bar
|
id: bar
|
||||||
|
|
||||||
|
|
@ -92,10 +93,10 @@ Variants {
|
||||||
|
|
||||||
// Top section (left widgets)
|
// Top section (left widgets)
|
||||||
Column {
|
Column {
|
||||||
spacing: Style.marginXS * root.scaling
|
spacing: Style.marginM * root.scaling
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: Style.marginS * root.scaling
|
anchors.topMargin: Style.marginL * root.scaling
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
|
@ -117,7 +118,7 @@ Variants {
|
||||||
|
|
||||||
// Center section (center widgets)
|
// Center section (center widgets)
|
||||||
Column {
|
Column {
|
||||||
spacing: Style.marginXS * root.scaling
|
spacing: Style.marginM * root.scaling
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
@ -141,10 +142,10 @@ Variants {
|
||||||
|
|
||||||
// Bottom section (right widgets)
|
// Bottom section (right widgets)
|
||||||
Column {
|
Column {
|
||||||
spacing: Style.marginXS * root.scaling
|
spacing: Style.marginM * root.scaling
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: Style.marginS * root.scaling
|
anchors.bottomMargin: Style.marginL * root.scaling
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,8 @@ Item {
|
||||||
return total
|
return total
|
||||||
}
|
}
|
||||||
|
|
||||||
implicitHeight: (barPosition === "left" || barPosition === "right") ? calculatedVerticalHeight() : Math.round(Style.barHeight * scaling)
|
implicitHeight: visible ? ((barPosition === "left" || barPosition === "right") ? calculatedVerticalHeight() : Math.round(Style.barHeight * scaling)) : 0
|
||||||
implicitWidth: (barPosition === "left" || barPosition === "right") ? Math.round(Style.baseWidgetSize * 0.8 * scaling) : (rowLayout.implicitWidth + Style.marginM * 2 * scaling)
|
implicitWidth: visible ? ((barPosition === "left" || barPosition === "right") ? Math.round(Style.baseWidgetSize * 0.8 * scaling) : (rowLayout.implicitWidth + Style.marginM * 2 * scaling)) : 0
|
||||||
|
|
||||||
visible: MediaService.currentPlayer !== null && MediaService.canPlay
|
visible: MediaService.currentPlayer !== null && MediaService.canPlay
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ Item {
|
||||||
readonly property int maxPillHeight: iconSize
|
readonly property int maxPillHeight: iconSize
|
||||||
|
|
||||||
// For horizontal bars: height is just icon size, width includes pill space
|
// For horizontal bars: height is just icon size, width includes pill space
|
||||||
width: revealed ? (iconSize + maxPillWidth - pillOverlap) : iconSize
|
width: revealed ? (openRightward ? (iconSize + maxPillWidth - pillOverlap) : (iconSize + maxPillWidth - pillOverlap)) : iconSize
|
||||||
height: iconSize
|
height: iconSize
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -60,7 +60,7 @@ Item {
|
||||||
height: revealed ? maxPillHeight : 1
|
height: revealed ? maxPillHeight : 1
|
||||||
|
|
||||||
// Position based on direction - center the pill relative to the icon
|
// Position based on direction - center the pill relative to the icon
|
||||||
x: openLeftward ? (iconCircle.x + iconCircle.width / 2 - width) : (iconCircle.x + iconCircle.width / 2)
|
x: openLeftward ? (iconCircle.x + iconCircle.width / 2 - width) : (iconCircle.x + iconCircle.width / 2 - pillOverlap)
|
||||||
y: 0
|
y: 0
|
||||||
|
|
||||||
opacity: revealed ? Style.opacityFull : Style.opacityNone
|
opacity: revealed ? Style.opacityFull : Style.opacityNone
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue