controlcenter/bt: better toggles collapsing logic
Hardcoded but eh
This commit is contained in:
parent
fb650907a0
commit
8cc78cfaf3
1 changed files with 5 additions and 3 deletions
|
|
@ -17,6 +17,8 @@ ColumnLayout {
|
|||
id: root
|
||||
|
||||
required property Session session
|
||||
readonly property bool smallDiscoverable: width <= 540
|
||||
readonly property bool smallPairable: width <= 480
|
||||
|
||||
anchors.fill: parent
|
||||
spacing: Appearance.spacing.small
|
||||
|
|
@ -48,8 +50,8 @@ ColumnLayout {
|
|||
|
||||
ToggleButton {
|
||||
toggled: Bluetooth.defaultAdapter?.discoverable ?? false
|
||||
icon: QsWindow.window.screen.height <= 1080 ? "group_search" : ""
|
||||
label: QsWindow.window.screen.height <= 1080 ? "" : qsTr("Discoverable")
|
||||
icon: root.smallDiscoverable ? "group_search" : ""
|
||||
label: root.smallDiscoverable ? "" : qsTr("Discoverable")
|
||||
|
||||
function onClicked(): void {
|
||||
const adapter = Bluetooth.defaultAdapter;
|
||||
|
|
@ -61,7 +63,7 @@ ColumnLayout {
|
|||
ToggleButton {
|
||||
toggled: Bluetooth.defaultAdapter?.pairable ?? false
|
||||
icon: "missing_controller"
|
||||
label: QsWindow.window.screen.height <= 960 ? "" : qsTr("Pairable")
|
||||
label: root.smallPairable ? "" : qsTr("Pairable")
|
||||
|
||||
function onClicked(): void {
|
||||
const adapter = Bluetooth.defaultAdapter;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue