mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 15:37:23 +00:00
better look and feel for tooltip configuration ui
This commit is contained in:
parent
09275731aa
commit
d00ab81fe9
@ -25,9 +25,11 @@ message(STATUS "Project: ${PROJECT_NAME}")
|
||||
message(STATUS "Version: ${PROJECT_VERSION}")
|
||||
message(STATUS "Build date: ${CURRENT_DATE}")
|
||||
|
||||
option(BUILD_FUTURE "Build with the features which will be marked as stable later" ON)
|
||||
option(BUILD_PLASMOIDS "Build plasmoids" ON)
|
||||
option(BUILD_DEB_PACKAGE "Build deb package" OFF)
|
||||
option(BUILD_RPM_PACKAGE "Build rpm package" OFF)
|
||||
set(QUEUE_LIMIT 10 CACHE INTEGER "Limit data queue to this value")
|
||||
|
||||
# flags
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
@ -98,6 +98,7 @@ Item {
|
||||
QtControls.Label {
|
||||
QtLayouts.Layout.fillHeight: true
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
wrapMode: Text.WordWrap
|
||||
horizontalAlignment: Text.AlignJustify
|
||||
verticalAlignment: Text.AlignTop
|
||||
textFormat: Text.RichText
|
||||
|
@ -93,7 +93,7 @@ Item {
|
||||
|
||||
onNewData: {
|
||||
if (debug) console.debug("Update source", sourceName)
|
||||
systemmonitorDE.interval = plasmoid.configuration.interval
|
||||
// systemmonitorDE.interval = plasmoid.configuration.interval
|
||||
|
||||
awKeys.dataUpdateReceived(sourceName, data, settings)
|
||||
}
|
||||
@ -113,7 +113,7 @@ Item {
|
||||
|
||||
onNewData: {
|
||||
if (debug) console.debug("Update source", sourceName)
|
||||
extsysmonDE.interval = plasmoid.configuration.interval
|
||||
// extsysmonDE.interval = plasmoid.configuration.interval
|
||||
|
||||
awKeys.dataUpdateReceived(sourceName, data, settings)
|
||||
}
|
||||
@ -169,7 +169,6 @@ Item {
|
||||
plasmoid.setAction("requestKey", i18n("Request key"), "utilities-system-monitor")
|
||||
plasmoid.setAction("showReadme", i18n("Show README"), "text-x-readme")
|
||||
plasmoid.setAction("checkUpdates", i18n("Check updates"), "system-software-update")
|
||||
// plasmoid.setAction("report", i18n("Mail to developers"), "email")
|
||||
// init submodule
|
||||
Plasmoid.userConfiguringChanged(false)
|
||||
// connect data
|
||||
@ -245,12 +244,6 @@ Item {
|
||||
return awActions.showReadme()
|
||||
}
|
||||
|
||||
function action_report() {
|
||||
if (debug) console.debug()
|
||||
|
||||
return awActions.sendEmail()
|
||||
}
|
||||
|
||||
function action_requestKey() {
|
||||
if (debug) console.debug()
|
||||
|
||||
|
@ -64,7 +64,7 @@ Item {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
wrapMode: Text.WordWrap
|
||||
text: i18n("CPU, CPU clock, memory, swap and network labels support graphical tooltip. To enable them just make needed checkbox fully checked.")
|
||||
text: i18n("CPU, CPU clock, memory, swap and network labels support graphical tooltip. To enable them just make needed checkbox checked.")
|
||||
}
|
||||
|
||||
Row {
|
||||
@ -87,427 +87,328 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
QtControls.GroupBox {
|
||||
id: useTooltipBackground
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5 - useTooltipBackground.width
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Background")
|
||||
}
|
||||
QtControls.CheckBox {
|
||||
id: useTooltipBackground
|
||||
height: parent.height
|
||||
width: implicitWidth
|
||||
style: QtStyles.CheckBoxStyle {
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 16
|
||||
implicitHeight: 16
|
||||
radius: 3
|
||||
border.width: 1
|
||||
border.color: control.activeFocus ? "darkblue" : "gray"
|
||||
Rectangle {
|
||||
visible: control.checked
|
||||
radius: 1
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
color: "#555555"
|
||||
border.color: "#333333"
|
||||
checkable: true
|
||||
title: i18n("Background")
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Background color")
|
||||
}
|
||||
QtControls.Button {
|
||||
id: tooltipBackground
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.tooltipBackground
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.tooltipBackground
|
||||
onClicked: tooltipBackgroundDialog.visible = true
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
id: tooltipBackground
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.tooltipBackground
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.tooltipBackground
|
||||
onClicked: tooltipBackgroundDialog.visible = true
|
||||
}
|
||||
|
||||
QtDialogs.ColorDialog {
|
||||
id: tooltipBackgroundDialog
|
||||
title: i18n("Select a color")
|
||||
color: tooltipBackground.text
|
||||
onAccepted: tooltipBackground.text = tooltipBackgroundDialog.color
|
||||
QtDialogs.ColorDialog {
|
||||
id: tooltipBackgroundDialog
|
||||
title: i18n("Select a color")
|
||||
color: tooltipBackground.text
|
||||
onAccepted: tooltipBackground.text = tooltipBackgroundDialog.color
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
QtControls.GroupBox {
|
||||
id: cpuTooltip
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5 - cpuTooltip.width
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("CPU color")
|
||||
}
|
||||
QtControls.CheckBox {
|
||||
id: cpuTooltip
|
||||
height: parent.height
|
||||
width: implicitWidth
|
||||
style: QtStyles.CheckBoxStyle {
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 16
|
||||
implicitHeight: 16
|
||||
radius: 3
|
||||
border.width: 1
|
||||
border.color: control.activeFocus ? "darkblue" : "gray"
|
||||
Rectangle {
|
||||
visible: control.checked
|
||||
radius: 1
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
color: "#555555"
|
||||
border.color: "#333333"
|
||||
checkable: true
|
||||
title: i18n("CPU")
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("CPU color")
|
||||
}
|
||||
QtControls.Button {
|
||||
id: cpuTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.cpuTooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.cpuTooltipColor
|
||||
onClicked: cpuTooltipColorDialog.visible = true
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
id: cpuTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.cpuTooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.cpuTooltipColor
|
||||
onClicked: cpuTooltipColorDialog.visible = true
|
||||
}
|
||||
|
||||
QtDialogs.ColorDialog {
|
||||
id: cpuTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: cpuTooltipColor.text
|
||||
onAccepted: cpuTooltipColor.text = cpuTooltipColorDialog.color
|
||||
QtDialogs.ColorDialog {
|
||||
id: cpuTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: cpuTooltipColor.text
|
||||
onAccepted: cpuTooltipColor.text = cpuTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
QtControls.GroupBox {
|
||||
id: cpuclTooltip
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5 - cpuclTooltip.width
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("CPU clock color")
|
||||
}
|
||||
QtControls.CheckBox {
|
||||
id: cpuclTooltip
|
||||
height: parent.height
|
||||
width: implicitWidth
|
||||
style: QtStyles.CheckBoxStyle {
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 16
|
||||
implicitHeight: 16
|
||||
radius: 3
|
||||
border.width: 1
|
||||
border.color: control.activeFocus ? "darkblue" : "gray"
|
||||
Rectangle {
|
||||
visible: control.checked
|
||||
radius: 1
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
color: "#555555"
|
||||
border.color: "#333333"
|
||||
checkable: true
|
||||
title: i18n("CPU clock")
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("CPU clock color")
|
||||
}
|
||||
QtControls.Button {
|
||||
id: cpuclTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.cpuclTooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.cpuclTooltipColor
|
||||
onClicked: cpuclTooltipColorDialog.visible = true
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
id: cpuclTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.cpuclTooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.cpuclTooltipColor
|
||||
onClicked: cpuclTooltipColorDialog.visible = true
|
||||
}
|
||||
|
||||
QtDialogs.ColorDialog {
|
||||
id: cpuclTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: cpuclTooltipColor.text
|
||||
onAccepted: cpuclTooltipColor.text = cpuclTooltipColorDialog.color
|
||||
QtDialogs.ColorDialog {
|
||||
id: cpuclTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: cpuclTooltipColor.text
|
||||
onAccepted: cpuclTooltipColor.text = cpuclTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
QtControls.GroupBox {
|
||||
id: memTooltip
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5 - memTooltip.width
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Memory color")
|
||||
}
|
||||
QtControls.CheckBox {
|
||||
id: memTooltip
|
||||
height: parent.height
|
||||
width: implicitWidth
|
||||
style: QtStyles.CheckBoxStyle {
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 16
|
||||
implicitHeight: 16
|
||||
radius: 3
|
||||
border.width: 1
|
||||
border.color: control.activeFocus ? "darkblue" : "gray"
|
||||
Rectangle {
|
||||
visible: control.checked
|
||||
radius: 1
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
color: "#555555"
|
||||
border.color: "#333333"
|
||||
checkable: true
|
||||
title: i18n("Memory")
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Memory color")
|
||||
}
|
||||
QtControls.Button {
|
||||
id: memTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.memTooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.memTooltipColor
|
||||
onClicked: memTooltipColorDialog.visible = true
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
id: memTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.memTooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.memTooltipColor
|
||||
onClicked: memTooltipColorDialog.visible = true
|
||||
}
|
||||
|
||||
QtDialogs.ColorDialog {
|
||||
id: memTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: memTooltipColor.text
|
||||
onAccepted: memTooltipColor.text = memTooltipColorDialog.color
|
||||
QtDialogs.ColorDialog {
|
||||
id: memTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: memTooltipColor.text
|
||||
onAccepted: memTooltipColor.text = memTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
QtControls.GroupBox {
|
||||
id: swapTooltip
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5 - swapTooltip.width
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Swap color")
|
||||
}
|
||||
QtControls.CheckBox {
|
||||
id: swapTooltip
|
||||
height: parent.height
|
||||
width: implicitWidth
|
||||
style: QtStyles.CheckBoxStyle {
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 16
|
||||
implicitHeight: 16
|
||||
radius: 3
|
||||
border.width: 1
|
||||
border.color: control.activeFocus ? "darkblue" : "gray"
|
||||
Rectangle {
|
||||
visible: control.checked
|
||||
radius: 1
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
color: "#555555"
|
||||
border.color: "#333333"
|
||||
checkable: true
|
||||
title: i18n("Swap")
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Swap color")
|
||||
}
|
||||
QtControls.Button {
|
||||
id: swapTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.swapTooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.swapTooltipColor
|
||||
onClicked: swapTooltipColorDialog.visible = true
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
id: swapTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.swapTooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.swapTooltipColor
|
||||
onClicked: swapTooltipColorDialog.visible = true
|
||||
}
|
||||
|
||||
QtDialogs.ColorDialog {
|
||||
id: swapTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: swapTooltipColor.text
|
||||
onAccepted: swapTooltipColor.text = swapTooltipColorDialog.color
|
||||
QtDialogs.ColorDialog {
|
||||
id: swapTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: swapTooltipColor.text
|
||||
onAccepted: swapTooltipColor.text = swapTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
QtControls.GroupBox {
|
||||
id: downTooltip
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5 - downTooltip.width
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Download speed color")
|
||||
}
|
||||
QtControls.CheckBox {
|
||||
id: downTooltip
|
||||
height: parent.height
|
||||
width: implicitWidth
|
||||
style: QtStyles.CheckBoxStyle {
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 16
|
||||
implicitHeight: 16
|
||||
radius: 3
|
||||
border.width: 1
|
||||
border.color: control.activeFocus ? "darkblue" : "gray"
|
||||
Rectangle {
|
||||
visible: control.checked
|
||||
radius: 1
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
color: "#555555"
|
||||
border.color: "#333333"
|
||||
checkable: true
|
||||
title: i18n("Network")
|
||||
Column {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Download speed color")
|
||||
}
|
||||
QtControls.Button {
|
||||
id: downTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.downTooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.downTooltipColor
|
||||
onClicked: downTooltipColorDialog.visible = true
|
||||
}
|
||||
|
||||
QtDialogs.ColorDialog {
|
||||
id: downTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: downTooltipColor.text
|
||||
onAccepted: downTooltipColor.text = downTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
id: downTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.downTooltipColor
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Upload speed color")
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.downTooltipColor
|
||||
onClicked: downTooltipColorDialog.visible = true
|
||||
}
|
||||
|
||||
QtDialogs.ColorDialog {
|
||||
id: downTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: downTooltipColor.text
|
||||
onAccepted: downTooltipColor.text = downTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Upload speed color")
|
||||
}
|
||||
QtControls.Button {
|
||||
id: upTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.upTooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.upTooltipColor
|
||||
onClicked: upTooltipColorDialog.visible = true
|
||||
}
|
||||
|
||||
QtDialogs.ColorDialog {
|
||||
id: upTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: upTooltipColor.text
|
||||
onAccepted: upTooltipColor.text = upTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5 - batTooltip.width
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Battery active color")
|
||||
}
|
||||
QtControls.CheckBox {
|
||||
id: batTooltip
|
||||
height: parent.height
|
||||
width: implicitWidth
|
||||
style: QtStyles.CheckBoxStyle {
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 16
|
||||
implicitHeight: 16
|
||||
radius: 3
|
||||
border.width: 1
|
||||
border.color: control.activeFocus ? "darkblue" : "gray"
|
||||
Rectangle {
|
||||
visible: control.checked
|
||||
radius: 1
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
color: "#555555"
|
||||
border.color: "#333333"
|
||||
QtControls.Button {
|
||||
id: upTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.upTooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.upTooltipColor
|
||||
onClicked: upTooltipColorDialog.visible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
id: batTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.batTooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.batTooltipColor
|
||||
onClicked: batTooltipColorDialog.visible = true
|
||||
}
|
||||
|
||||
QtDialogs.ColorDialog {
|
||||
id: batTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: batTooltipColor.text
|
||||
onAccepted: batTooltipColor.text = batTooltipColorDialog.color
|
||||
QtDialogs.ColorDialog {
|
||||
id: upTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: upTooltipColor.text
|
||||
onAccepted: upTooltipColor.text = upTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
QtControls.GroupBox {
|
||||
id: batTooltip
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Battery inactive color")
|
||||
}
|
||||
QtControls.Button {
|
||||
id: batInTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.batInTooltipColor
|
||||
checkable: true
|
||||
title: i18n("Battery")
|
||||
Column {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Battery active color")
|
||||
}
|
||||
QtControls.Button {
|
||||
id: batTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.batTooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.batTooltipColor
|
||||
onClicked: batTooltipColorDialog.visible = true
|
||||
}
|
||||
|
||||
QtDialogs.ColorDialog {
|
||||
id: batTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: batTooltipColor.text
|
||||
onAccepted: batTooltipColor.text = batTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.batInTooltipColor
|
||||
onClicked: batInTooltipColorDialog.visible = true
|
||||
}
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: i18n("Battery inactive color")
|
||||
}
|
||||
QtControls.Button {
|
||||
id: batInTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: plasmoid.configuration.batInTooltipColor
|
||||
}
|
||||
}
|
||||
text: plasmoid.configuration.batInTooltipColor
|
||||
onClicked: batInTooltipColorDialog.visible = true
|
||||
}
|
||||
|
||||
QtDialogs.ColorDialog {
|
||||
id: batInTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: batInTooltipColor.text
|
||||
onAccepted: batInTooltipColor.text = batInTooltipColorDialog.color
|
||||
QtDialogs.ColorDialog {
|
||||
id: batInTooltipColorDialog
|
||||
title: i18n("Select a color")
|
||||
color: batInTooltipColor.text
|
||||
onAccepted: batInTooltipColor.text = batInTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
find_package(Gettext REQUIRED)
|
||||
|
||||
# main qt libraries
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core DBus Network Script Qml Widgets)
|
||||
find_package(Qt5 5.4.0 REQUIRED COMPONENTS Core DBus Network Script Qml Widgets)
|
||||
add_definitions(
|
||||
${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS} ${Qt5Network_DEFINITIONS}
|
||||
${Qt5Script_DEFINITIONS} ${Qt5Qml_DEFINITIONS} ${Qt5Widgets_DEFINITIONS}
|
||||
|
@ -8,7 +8,7 @@
|
||||
#define TRANSLATORS "Ernesto Aviles Vzqz (Spanish), Mermouy (French), underr (Brazillian Portuguese), Viktor Slobodyan (Ukrainian), Lemueler (Chinese), Heimen Stoffels (Dutch)"
|
||||
#define EMAIL "@PROJECT_CONTACT@"
|
||||
#define LICENSE "@PROJECT_LICENSE@"
|
||||
#define TRDPARTY_LICENSE "tasks,BSD,https://github.com/mhogomchungu/tasks"
|
||||
#define TRDPARTY_LICENSE "tasks,BSD,https://github.com/mhogomchungu/tasks;QReplyTimeout wrapper,no,http://codereview.stackexchange.com/questions/30031/qnetworkreply-network-reply-timeout-helper"
|
||||
|
||||
// configuraion
|
||||
// graphical items api version
|
||||
@ -23,8 +23,7 @@
|
||||
#define AWEWAPI 2
|
||||
// available time keys
|
||||
#define TIME_KEYS "dddd,ddd,dd,d,MMMM,MMM,MM,M,yyyy,yy,hh,h,HH,H,mm,m,ss,s,t,ap,a,AP,A"
|
||||
// messages queue limit
|
||||
#define QUEUE_LIMIT 10
|
||||
#cmakedefine BUILD_FUTURE
|
||||
|
||||
// links
|
||||
#define HOMEPAGE "https://arcanis.name/projects/awesome-widgets/"
|
||||
@ -33,7 +32,7 @@
|
||||
#define VERSION_API "https://api.github.com/repos/arcan1s/awesome-widgets/releases"
|
||||
#define BUGTRACKER "https://github.com/arcan1s/awesome-widgets/issues"
|
||||
#define TRANSLATION "https://github.com/arcan1s/awesome-widgets/issues/14"
|
||||
#define AUR_PACKAGES "https://aur.archlinux.org/packages/kdeplasma-applets-awesome-widgets/"
|
||||
#define AUR_PACKAGES "https://aur.archlinux.org/packages/plasma5-applet-awesome-widgets/"
|
||||
#define OPENSUSE_PACKAGES "http://software.opensuse.org/package/awesome-widgets"
|
||||
|
||||
// build information
|
||||
@ -44,5 +43,6 @@
|
||||
#define CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
|
||||
#define CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
|
||||
#define BUILD_PLASMOIDS "@BUILD_PLASMOIDS@"
|
||||
#define QUEUE_LIMIT @QUEUE_LIMIT@
|
||||
|
||||
#endif /* VERSION_H */
|
||||
|
Loading…
Reference in New Issue
Block a user