forked from Shinonome/dots-hyprland
feat: refactor font settings and add width config option
This commit is contained in:
@@ -190,8 +190,11 @@ Singleton {
|
||||
property bool showDate: true
|
||||
property bool animateChange: true
|
||||
property bool vertical: false
|
||||
property real weight: 350
|
||||
property real size: 90
|
||||
property JsonObject font: JsonObject {
|
||||
property real weight: 350
|
||||
property real width: 100
|
||||
property real size: 90
|
||||
}
|
||||
}
|
||||
property JsonObject quote: JsonObject {
|
||||
property bool enable: false
|
||||
|
||||
@@ -29,8 +29,11 @@ ColumnLayout {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
font {
|
||||
pixelSize: Config.options.background.widgets.clock.digital.size
|
||||
weight: Config.options.background.widgets.clock.digital.weight
|
||||
pixelSize: Config.options.background.widgets.clock.digital.font.size
|
||||
weight: Config.options.background.widgets.clock.digital.font.weight
|
||||
variableAxes: ({
|
||||
"wdth": Config.options.background.widgets.clock.digital.font.width,
|
||||
})
|
||||
}
|
||||
}
|
||||
ClockText {
|
||||
@@ -43,8 +46,11 @@ ColumnLayout {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
font {
|
||||
pixelSize: Config.options.background.widgets.clock.digital.size
|
||||
weight: Config.options.background.widgets.clock.digital.weight
|
||||
pixelSize: Config.options.background.widgets.clock.digital.font.size
|
||||
weight: Config.options.background.widgets.clock.digital.font.weight
|
||||
variableAxes: ({
|
||||
"wdth": Config.options.background.widgets.clock.digital.font.width,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,24 +215,35 @@ ContentPage {
|
||||
}
|
||||
ConfigSlider {
|
||||
text: Translation.tr("Font weight")
|
||||
value: Config.options.background.widgets.clock.digital.weight
|
||||
value: Config.options.background.widgets.clock.digital.font.weight
|
||||
usePercentTooltip: false
|
||||
buttonIcon: "format_bold"
|
||||
from: 1
|
||||
to: 1000
|
||||
onValueChanged: {
|
||||
Config.options.background.widgets.clock.digital.weight = value;
|
||||
Config.options.background.widgets.clock.digital.font.weight = value;
|
||||
}
|
||||
}
|
||||
ConfigSlider {
|
||||
text: Translation.tr("Font Width")
|
||||
value: Config.options.background.widgets.clock.digital.font.width
|
||||
usePercentTooltip: false
|
||||
buttonIcon: "fit_width"
|
||||
from: 25
|
||||
to: 125
|
||||
onValueChanged: {
|
||||
Config.options.background.widgets.clock.digital.font.width = value;
|
||||
}
|
||||
}
|
||||
ConfigSlider {
|
||||
text: Translation.tr("Font Size")
|
||||
value: Config.options.background.widgets.clock.digital.size
|
||||
value: Config.options.background.widgets.clock.digital.font.size
|
||||
usePercentTooltip: false
|
||||
buttonIcon: "format_size"
|
||||
from: 70
|
||||
to: 150
|
||||
onValueChanged: {
|
||||
Config.options.background.widgets.clock.digital.size = value;
|
||||
Config.options.background.widgets.clock.digital.font.size = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user