mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 23:47:20 +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,37 +87,21 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtControls.GroupBox {
|
||||
id: useTooltipBackground
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
checkable: true
|
||||
title: i18n("Background")
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5 - useTooltipBackground.width
|
||||
width: parent.width * 2 / 5
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
text: i18n("Background color")
|
||||
}
|
||||
QtControls.Button {
|
||||
id: tooltipBackground
|
||||
@ -138,39 +122,24 @@ Item {
|
||||
onAccepted: tooltipBackground.text = tooltipBackgroundDialog.color
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QtControls.GroupBox {
|
||||
id: cpuTooltip
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
checkable: true
|
||||
title: i18n("CPU")
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5 - cpuTooltip.width
|
||||
width: parent.width * 2 / 5
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
id: cpuTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
@ -190,39 +159,24 @@ Item {
|
||||
onAccepted: cpuTooltipColor.text = cpuTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QtControls.GroupBox {
|
||||
id: cpuclTooltip
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
checkable: true
|
||||
title: i18n("CPU clock")
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5 - cpuclTooltip.width
|
||||
width: parent.width * 2 / 5
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
id: cpuclTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
@ -242,39 +196,24 @@ Item {
|
||||
onAccepted: cpuclTooltipColor.text = cpuclTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QtControls.GroupBox {
|
||||
id: memTooltip
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
checkable: true
|
||||
title: i18n("Memory")
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5 - memTooltip.width
|
||||
width: parent.width * 2 / 5
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
id: memTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
@ -294,39 +233,24 @@ Item {
|
||||
onAccepted: memTooltipColor.text = memTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QtControls.GroupBox {
|
||||
id: swapTooltip
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
checkable: true
|
||||
title: i18n("Swap")
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
QtControls.Label {
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5 - swapTooltip.width
|
||||
width: parent.width * 2 / 5
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
id: swapTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
@ -346,39 +270,27 @@ Item {
|
||||
onAccepted: swapTooltipColor.text = swapTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QtControls.GroupBox {
|
||||
id: downTooltip
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
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 - downTooltip.width
|
||||
width: parent.width * 2 / 5
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
id: downTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
@ -398,7 +310,6 @@ Item {
|
||||
onAccepted: downTooltipColor.text = downTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
@ -428,39 +339,28 @@ Item {
|
||||
onAccepted: upTooltipColor.text = upTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QtControls.GroupBox {
|
||||
id: batTooltip
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
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 - batTooltip.width
|
||||
width: parent.width * 2 / 5
|
||||
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: batTooltipColor
|
||||
width: parent.width * 3 / 5
|
||||
@ -480,7 +380,6 @@ Item {
|
||||
onAccepted: batTooltipColor.text = batTooltipColorDialog.color
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
@ -511,6 +410,8 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (debug) console.debug()
|
||||
|
@ -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