NIconButton: default scale is 1.0, default show border

This commit is contained in:
quadbyte 2025-08-12 10:40:24 -04:00
parent 7fe87c0633
commit f8e436fb2d
7 changed files with 14 additions and 16 deletions

View file

@ -106,6 +106,8 @@ Variants {
id: demoPanelToggle
icon: "experiment"
tooltipText: "Open demo panel"
sizeMultiplier: 0.8
showBorder: false
anchors.verticalCenter: parent.verticalCenter
onClicked: function () {
demoPanel.isLoaded = !demoPanel.isLoaded
@ -116,6 +118,8 @@ Variants {
id: sidePanelToggle
icon: "widgets"
tooltipText: "Open side panel"
sizeMultiplier: 0.8
showBorder: false
anchors.verticalCenter: parent.verticalCenter
onClicked: function () {
// Map this button's center to the screen and open the side panel below it

View file

@ -11,7 +11,8 @@ NIconButton {
readonly property real scaling: Scaling.scale(screen)
readonly property bool wifiEnabled: Settings.data.network.wifiEnabled
sizeMultiplier: 0.8
showBorder: false
icon: {
let connected = false
for (const net in network.networks) {

View file

@ -77,6 +77,7 @@ NLoader {
NIconButton {
icon: "refresh"
sizeMultiplier: 0.8
onClicked: function () {
network.refreshNetworks()
}
@ -84,6 +85,7 @@ NLoader {
NIconButton {
icon: "close"
sizeMultiplier: 0.8
onClicked: function () {
wifiPanel.visible = false
network.onMenuClosed()

View file

@ -82,7 +82,6 @@ NLoader {
}
NIconButton {
icon: "refresh"
sizeMultiplier: 1.0
fontPointSize: Style.fontSizeXL * scaling
onClicked: function () {
Scaling.overrideEnabled = false
@ -107,7 +106,6 @@ NLoader {
NIconButton {
id: myIconButton
icon: "celebration"
sizeMultiplier: 1.0
fontPointSize: Style.fontSizeXL * scaling
}

View file

@ -185,6 +185,8 @@ PanelWindow {
}
NIconButton {
sizeMultiplier: 0.8
showBorder: false
anchors.top: parent.top
anchors.right: parent.right
anchors.margins: Style.marginSmall * scaling

View file

@ -59,7 +59,6 @@ NBox {
}
NIconButton {
icon: "settings"
sizeMultiplier: 0.9
onClicked: function () {
if (!root.settingsWindow) {
const comp = Qt.createComponent("../Settings/SettingsWindow.qml")
@ -80,12 +79,10 @@ NBox {
}
NIconButton {
icon: "power_settings_new"
sizeMultiplier: 0.9
}
}
}
Timer {
interval: 60000
repeat: true
@ -101,7 +98,6 @@ NBox {
stdout: StdioCollector {
onStreamFinished: {
var uptimeSeconds = parseFloat(this.text.trim().split(' ')[0])
var minutes = Math.floor(uptimeSeconds / 60) % 60
var hours = Math.floor(uptimeSeconds / 3600) % 24
var days = Math.floor(uptimeSeconds / 86400)

View file

@ -138,19 +138,16 @@ NLoader {
// Performance
NIconButton {
icon: "speed"
sizeMultiplier: 1.0
onClicked: function () {/* TODO: hook to power profile */ }
}
// Balanced
NIconButton {
icon: "balance"
sizeMultiplier: 1.0
onClicked: function () {/* TODO: hook to power profile */ }
}
// Eco
NIconButton {
icon: "eco"
sizeMultiplier: 1.0
onClicked: function () {/* TODO: hook to power profile */ }
}
Item {
@ -175,12 +172,10 @@ NLoader {
// Record
NIconButton {
icon: "fiber_manual_record"
sizeMultiplier: 1.0
}
// Wallpaper
NIconButton {
icon: "image"
sizeMultiplier: 1.0
}
Item {
Layout.fillWidth: true