mirror of
https://github.com/developersu/ClearClock.git
synced 2025-05-14 19:20:26 +03:00
Update package
This commit is contained in:
parent
a0d8cb7b34
commit
b15f62dabd
5 changed files with 14 additions and 68 deletions
Binary file not shown.
|
@ -17,7 +17,7 @@
|
|||
</entry>
|
||||
<entry name="clockFontFamily" type="string">
|
||||
<label>Sets the clock font family.</label>
|
||||
<default>ClearClock Default</default>
|
||||
<default>ccdefault</default>
|
||||
</entry>
|
||||
<entry name="clockBoldText" type="Bool">
|
||||
<label>Sets the clock font to bold.</label>
|
||||
|
@ -42,7 +42,7 @@
|
|||
</entry>
|
||||
<entry name="dayFontFamily" type="string">
|
||||
<label>Sets the day font family.</label>
|
||||
<default>ClearClock Default</default>
|
||||
<default>ccdefault</default>
|
||||
</entry>
|
||||
<entry name="dayBoldText" type="Bool">
|
||||
<label>Sets the day font to bold.</label>
|
||||
|
@ -71,7 +71,7 @@
|
|||
</entry>
|
||||
<entry name="dateFontFamily" type="string">
|
||||
<label>Sets the date font family.</label>
|
||||
<default>ClearClock Default</default>
|
||||
<default>ccdefault</default>
|
||||
</entry>
|
||||
<entry name="dateBoldText" type="Bool">
|
||||
<label>Sets the date font to bold.</label>
|
||||
|
|
|
@ -10,6 +10,8 @@ import QtQuick.Dialogs 1.2
|
|||
|
||||
import org.kde.kirigami 2.3 as Kirigami
|
||||
|
||||
import "../lib"
|
||||
|
||||
Item {
|
||||
id: appearancePage
|
||||
width: childrenRect.width
|
||||
|
@ -18,7 +20,7 @@ Item {
|
|||
signal configurationChanged
|
||||
|
||||
property alias cfg_clockUse24hFormat: use24hFormat.checkState
|
||||
property string cfg_clockFontColor: clockFontColorRect.color
|
||||
property string cfg_clockFontColor: clockFontColor.value
|
||||
property string cfg_clockFontFamily
|
||||
property alias cfg_clockBoldText: clockBoldCheckBox.checked
|
||||
property alias cfg_clockItalicText: clockItalicCheckBox.checked
|
||||
|
@ -39,6 +41,7 @@ Item {
|
|||
property alias cfg_dateItalicText: dateItalicCheckBox.checked
|
||||
property alias cfg_dateFontSize: dateFontSizeSpinBox.value
|
||||
|
||||
|
||||
function fixFontFamilyChange(id, comboBox) {
|
||||
// HACK by the time we populate our model and/or the ComboBox is finished the value is still undefined
|
||||
if (id) {
|
||||
|
@ -73,7 +76,7 @@ Item {
|
|||
})
|
||||
arr.push({
|
||||
"text": "ClearClock Default",
|
||||
"value": "default"
|
||||
"value": "ccdefault"
|
||||
})
|
||||
|
||||
var fonts = Qt.fontFamilies()
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
import QtQuick 2.0
|
||||
import QtQuick.Controls 1.0
|
||||
import QtQuick.Layouts 1.0
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Window 2.2
|
||||
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||
|
||||
import ".."
|
||||
|
||||
Button {
|
||||
id: configColor
|
||||
|
||||
property alias horizontalAlignment: label.horizontalAlignment
|
||||
|
||||
property string configKey: ''
|
||||
property string configValue: configKey ? plasmoid.configuration[configKey] : ""
|
||||
property string defaultColor: ''
|
||||
readonly property color value: configValue || defaultColor
|
||||
|
||||
onConfigValueChanged: {
|
||||
if (configKey) {
|
||||
plasmoid.configuration[configKey] = configValue
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: dialog.open()
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: configColor.value
|
||||
border.width: 2
|
||||
border.color: parent.containsMouse ? theme.highlightColor : "#BB000000"
|
||||
}
|
||||
|
||||
ColorDialog {
|
||||
id: dialog
|
||||
visible: false
|
||||
modality: Qt.WindowModal
|
||||
title: configColor.label
|
||||
showAlphaChannel: true
|
||||
color: configColor.value
|
||||
|
||||
onCurrentColorChanged: {
|
||||
if (visible && color != currentColor) {
|
||||
configColor.configValue = currentColor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -42,13 +42,6 @@ Item {
|
|||
source: "../fonts/Smooch-Regular.ttf"
|
||||
}
|
||||
|
||||
function max(a, b) {
|
||||
if (a > b)
|
||||
return a
|
||||
else
|
||||
return b
|
||||
}
|
||||
|
||||
Plasmoid.fullRepresentation: ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: -20
|
||||
|
@ -65,12 +58,13 @@ Item {
|
|||
id: textMetricsDayLabel
|
||||
font.family: dayLabel.font.family
|
||||
font.pixelSize: dayLabel.font.pixelSize
|
||||
font.bold: dayLabel.font.bold
|
||||
text: " Wednesday "
|
||||
}
|
||||
|
||||
Item {
|
||||
width: max(textMetricsClockLabel.width, textMetricsDayLabel.width)
|
||||
height: max(textMetricsClockLabel.height, textMetricsDayLabel.height)
|
||||
width: Math.max(textMetricsClockLabel.width, textMetricsDayLabel.width)
|
||||
height: Math.max(textMetricsClockLabel.height, textMetricsDayLabel.height)
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
||||
PlasmaComponents.Label {
|
||||
|
@ -80,7 +74,7 @@ Item {
|
|||
text: Qt.formatTime(currentDateTime).replace(":", ".")
|
||||
|
||||
color: plasmoid.configuration.clockFontColor
|
||||
font.family: if (plasmoid.configuration.clockFontFamily === "default") fontOutfitBold.name
|
||||
font.family: if (plasmoid.configuration.clockFontFamily === "ccdefault") fontOutfitBold.name
|
||||
else plasmoid.configuration.clockFontFamily
|
||||
font.bold: plasmoid.configuration.clockBoldText
|
||||
font.italic: plasmoid.configuration.clockItalicText
|
||||
|
@ -95,7 +89,7 @@ Item {
|
|||
text: Qt.formatDate(currentDateTime, "dddd")
|
||||
|
||||
color: plasmoid.configuration.dayFontColor
|
||||
font.family: if (plasmoid.configuration.dayFontFamily === "default") fontSmooch.name
|
||||
font.family: if (plasmoid.configuration.dayFontFamily === "ccdefault") fontSmooch.name
|
||||
else plasmoid.configuration.dayFontFamily
|
||||
font.bold: plasmoid.configuration.daykBoldText
|
||||
font.italic: plasmoid.configuration.dayItalicText
|
||||
|
@ -111,7 +105,7 @@ Item {
|
|||
text: Qt.formatDate(currentDateTime, plasmoid.configuration.dateCustomDateFormat)
|
||||
|
||||
color: plasmoid.configuration.dateFontColor
|
||||
font.family: if (plasmoid.configuration.dateFontFamily === "default") fontOutfitRegular.name
|
||||
font.family: if (plasmoid.configuration.dateFontFamily === "ccdefault") fontOutfitRegular.name
|
||||
else plasmoid.configuration.dateFontFamily
|
||||
font.bold: plasmoid.configuration.dateBoldText
|
||||
font.italic: plasmoid.configuration.dateItalicText
|
||||
|
|
Loading…
Reference in a new issue