NIconButton: default scale is 1.0, default show border
This commit is contained in:
parent
7fe87c0633
commit
f8e436fb2d
7 changed files with 14 additions and 16 deletions
|
|
@ -106,6 +106,8 @@ Variants {
|
||||||
id: demoPanelToggle
|
id: demoPanelToggle
|
||||||
icon: "experiment"
|
icon: "experiment"
|
||||||
tooltipText: "Open demo panel"
|
tooltipText: "Open demo panel"
|
||||||
|
sizeMultiplier: 0.8
|
||||||
|
showBorder: false
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
onClicked: function () {
|
onClicked: function () {
|
||||||
demoPanel.isLoaded = !demoPanel.isLoaded
|
demoPanel.isLoaded = !demoPanel.isLoaded
|
||||||
|
|
@ -116,6 +118,8 @@ Variants {
|
||||||
id: sidePanelToggle
|
id: sidePanelToggle
|
||||||
icon: "widgets"
|
icon: "widgets"
|
||||||
tooltipText: "Open side panel"
|
tooltipText: "Open side panel"
|
||||||
|
sizeMultiplier: 0.8
|
||||||
|
showBorder: false
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
onClicked: function () {
|
onClicked: function () {
|
||||||
// Map this button's center to the screen and open the side panel below it
|
// Map this button's center to the screen and open the side panel below it
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@ NIconButton {
|
||||||
|
|
||||||
readonly property real scaling: Scaling.scale(screen)
|
readonly property real scaling: Scaling.scale(screen)
|
||||||
readonly property bool wifiEnabled: Settings.data.network.wifiEnabled
|
readonly property bool wifiEnabled: Settings.data.network.wifiEnabled
|
||||||
|
sizeMultiplier: 0.8
|
||||||
|
showBorder: false
|
||||||
icon: {
|
icon: {
|
||||||
let connected = false
|
let connected = false
|
||||||
for (const net in network.networks) {
|
for (const net in network.networks) {
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ NLoader {
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "refresh"
|
icon: "refresh"
|
||||||
|
sizeMultiplier: 0.8
|
||||||
onClicked: function () {
|
onClicked: function () {
|
||||||
network.refreshNetworks()
|
network.refreshNetworks()
|
||||||
}
|
}
|
||||||
|
|
@ -84,6 +85,7 @@ NLoader {
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "close"
|
icon: "close"
|
||||||
|
sizeMultiplier: 0.8
|
||||||
onClicked: function () {
|
onClicked: function () {
|
||||||
wifiPanel.visible = false
|
wifiPanel.visible = false
|
||||||
network.onMenuClosed()
|
network.onMenuClosed()
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,6 @@ NLoader {
|
||||||
}
|
}
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "refresh"
|
icon: "refresh"
|
||||||
sizeMultiplier: 1.0
|
|
||||||
fontPointSize: Style.fontSizeXL * scaling
|
fontPointSize: Style.fontSizeXL * scaling
|
||||||
onClicked: function () {
|
onClicked: function () {
|
||||||
Scaling.overrideEnabled = false
|
Scaling.overrideEnabled = false
|
||||||
|
|
@ -107,7 +106,6 @@ NLoader {
|
||||||
NIconButton {
|
NIconButton {
|
||||||
id: myIconButton
|
id: myIconButton
|
||||||
icon: "celebration"
|
icon: "celebration"
|
||||||
sizeMultiplier: 1.0
|
|
||||||
fontPointSize: Style.fontSizeXL * scaling
|
fontPointSize: Style.fontSizeXL * scaling
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -185,6 +185,8 @@ PanelWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
NIconButton {
|
NIconButton {
|
||||||
|
sizeMultiplier: 0.8
|
||||||
|
showBorder: false
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.margins: Style.marginSmall * scaling
|
anchors.margins: Style.marginSmall * scaling
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,6 @@ NBox {
|
||||||
}
|
}
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "settings"
|
icon: "settings"
|
||||||
sizeMultiplier: 0.9
|
|
||||||
onClicked: function () {
|
onClicked: function () {
|
||||||
if (!root.settingsWindow) {
|
if (!root.settingsWindow) {
|
||||||
const comp = Qt.createComponent("../Settings/SettingsWindow.qml")
|
const comp = Qt.createComponent("../Settings/SettingsWindow.qml")
|
||||||
|
|
@ -80,17 +79,15 @@ NBox {
|
||||||
}
|
}
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "power_settings_new"
|
icon: "power_settings_new"
|
||||||
sizeMultiplier: 0.9
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
interval: 60000
|
interval: 60000
|
||||||
repeat: true
|
repeat: true
|
||||||
running: true
|
running: true
|
||||||
onTriggered: uptimeProcess.running = true
|
onTriggered: uptimeProcess.running = true
|
||||||
}
|
}
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
|
|
@ -101,7 +98,6 @@ NBox {
|
||||||
stdout: StdioCollector {
|
stdout: StdioCollector {
|
||||||
onStreamFinished: {
|
onStreamFinished: {
|
||||||
var uptimeSeconds = parseFloat(this.text.trim().split(' ')[0])
|
var uptimeSeconds = parseFloat(this.text.trim().split(' ')[0])
|
||||||
|
|
||||||
var minutes = Math.floor(uptimeSeconds / 60) % 60
|
var minutes = Math.floor(uptimeSeconds / 60) % 60
|
||||||
var hours = Math.floor(uptimeSeconds / 3600) % 24
|
var hours = Math.floor(uptimeSeconds / 3600) % 24
|
||||||
var days = Math.floor(uptimeSeconds / 86400)
|
var days = Math.floor(uptimeSeconds / 86400)
|
||||||
|
|
|
||||||
|
|
@ -138,19 +138,16 @@ NLoader {
|
||||||
// Performance
|
// Performance
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "speed"
|
icon: "speed"
|
||||||
sizeMultiplier: 1.0
|
|
||||||
onClicked: function () {/* TODO: hook to power profile */ }
|
onClicked: function () {/* TODO: hook to power profile */ }
|
||||||
}
|
}
|
||||||
// Balanced
|
// Balanced
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "balance"
|
icon: "balance"
|
||||||
sizeMultiplier: 1.0
|
|
||||||
onClicked: function () {/* TODO: hook to power profile */ }
|
onClicked: function () {/* TODO: hook to power profile */ }
|
||||||
}
|
}
|
||||||
// Eco
|
// Eco
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "eco"
|
icon: "eco"
|
||||||
sizeMultiplier: 1.0
|
|
||||||
onClicked: function () {/* TODO: hook to power profile */ }
|
onClicked: function () {/* TODO: hook to power profile */ }
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
|
@ -175,12 +172,10 @@ NLoader {
|
||||||
// Record
|
// Record
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "fiber_manual_record"
|
icon: "fiber_manual_record"
|
||||||
sizeMultiplier: 1.0
|
|
||||||
}
|
}
|
||||||
// Wallpaper
|
// Wallpaper
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "image"
|
icon: "image"
|
||||||
sizeMultiplier: 1.0
|
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue