bar/clock: allow hiding icon (#484)
* bar(clock): allow hiding the calendar icon * loader + showCalendarIcon -> showIcon --------- Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
This commit is contained in:
parent
4b9643a802
commit
fc3b08f6cb
3 changed files with 20 additions and 6 deletions
|
|
@ -219,6 +219,9 @@ default, you must create it manually.
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bar": {
|
"bar": {
|
||||||
|
"clock": {
|
||||||
|
"showIcon": true
|
||||||
|
},
|
||||||
"dragThreshold": 20,
|
"dragThreshold": 20,
|
||||||
"entries": [
|
"entries": [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ JsonObject {
|
||||||
property Workspaces workspaces: Workspaces {}
|
property Workspaces workspaces: Workspaces {}
|
||||||
property Tray tray: Tray {}
|
property Tray tray: Tray {}
|
||||||
property Status status: Status {}
|
property Status status: Status {}
|
||||||
|
property Clock clock: Clock {}
|
||||||
property Sizes sizes: Sizes {}
|
property Sizes sizes: Sizes {}
|
||||||
|
|
||||||
property list<var> entries: [
|
property list<var> entries: [
|
||||||
|
|
@ -77,6 +78,10 @@ JsonObject {
|
||||||
property bool showBattery: true
|
property bool showBattery: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
component Clock: JsonObject {
|
||||||
|
property bool showIcon: true
|
||||||
|
}
|
||||||
|
|
||||||
component Sizes: JsonObject {
|
component Sizes: JsonObject {
|
||||||
property int innerWidth: 40
|
property int innerWidth: 40
|
||||||
property int windowPreviewSize: 400
|
property int windowPreviewSize: 400
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
import qs.components
|
import qs.components
|
||||||
import qs.services
|
import qs.services
|
||||||
import qs.config
|
import qs.config
|
||||||
|
|
@ -10,13 +12,17 @@ Column {
|
||||||
|
|
||||||
spacing: Appearance.spacing.small
|
spacing: Appearance.spacing.small
|
||||||
|
|
||||||
MaterialIcon {
|
Loader {
|
||||||
id: icon
|
|
||||||
|
|
||||||
text: "calendar_month"
|
|
||||||
color: root.colour
|
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
|
active: Config.bar.clock.showIcon
|
||||||
|
visible: active
|
||||||
|
asynchronous: true
|
||||||
|
|
||||||
|
sourceComponent: MaterialIcon {
|
||||||
|
text: "calendar_month"
|
||||||
|
color: root.colour
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue