Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Plasma Add-ons
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Plasma
Plasma Add-ons
Commits
9a274016
Commit
9a274016
authored
Jan 15, 2018
by
Friedrich W. H. Kossebau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[weather] Disable option for temperature in compact mode when in systray
parent
8c23889d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
1 deletion
+19
-1
applets/weather/package/contents/ui/CompactRepresentation.qml
...ets/weather/package/contents/ui/CompactRepresentation.qml
+2
-1
applets/weather/package/contents/ui/config/ConfigAppearance.qml
...s/weather/package/contents/ui/config/ConfigAppearance.qml
+4
-0
applets/weather/package/contents/ui/main.qml
applets/weather/package/contents/ui/main.qml
+9
-0
applets/weather/weatherapplet.h
applets/weather/weatherapplet.h
+4
-0
No files found.
applets/weather/package/contents/ui/CompactRepresentation.qml
View file @
9a274016
...
...
@@ -26,7 +26,8 @@ ColumnLayout {
id
:
compactRoot
readonly
property
bool
vertical
:
(
plasmoid
.
formFactor
==
PlasmaCore
.
Types
.
Vertical
)
readonly
property
bool
showTemperature
:
plasmoid
.
nativeInterface
.
configuration
.
showTemperatureInCompactMode
readonly
property
bool
showTemperature
:
plasmoid
.
nativeInterface
.
configuration
.
showTemperatureInCompactMode
&&
!
plasmoid
.
nativeInterface
.
needsToBeSquare
Loader
{
id
:
loader
...
...
applets/weather/package/contents/ui/config/ConfigAppearance.qml
View file @
9a274016
...
...
@@ -25,6 +25,8 @@ import org.kde.plasma.private.weather 1.0
ColumnLayout
{
id
:
displayConfigPage
readonly
property
bool
canShowTemperature
:
!
plasmoid
.
nativeInterface
.
needsToBeSquare
signal
configurationChanged
function
saveConfig
()
{
...
...
@@ -50,6 +52,7 @@ ColumnLayout {
Layout.row
:
0
Layout.column
:
0
Layout.alignment
:
Qt
.
AlignRight
enabled
:
canShowTemperature
text
:
i18n
(
"
Show temperature in compact mode:
"
)
}
...
...
@@ -58,6 +61,7 @@ ColumnLayout {
Layout.row
:
0
Layout.column
:
1
enabled
:
canShowTemperature
onCheckedChanged
:
displayConfigPage
.
configurationChanged
();
}
...
...
applets/weather/package/contents/ui/main.qml
View file @
9a274016
...
...
@@ -50,4 +50,13 @@ Item {
Plasmoid.fullRepresentation
:
FullRepresentation
{
}
Component.onCompleted
:
{
// workaround for missing note about being in systray or similar (kde bug #388995)
// guess from cointainer structure data and make available to config page
plasmoid
.
nativeInterface
.
needsToBeSquare
=
(
plasmoid
.
parent
!==
null
&&
((
plasmoid
.
parent
.
pluginName
===
'
org.kde.plasma.private.systemtray
'
||
plasmoid
.
parent
.
objectName
===
'
taskItemContainer
'
)));
}
}
applets/weather/weatherapplet.h
View file @
9a274016
...
...
@@ -32,6 +32,8 @@ class WeatherApplet : public Plasma::WeatherPopupApplet
Q_PROPERTY
(
QVariantList
noticesModel
READ
noticesModel
NOTIFY
modelUpdated
)
Q_PROPERTY
(
QVariantMap
configuration
READ
configuration
NOTIFY
configurationChanged
FINAL
)
// used for making this information available to the config pages
Q_PROPERTY
(
bool
needsToBeSquare
MEMBER
m_needsToBeSquare
NOTIFY
needsToBeSquareChanged
FINAL
)
public:
WeatherApplet
(
QObject
*
parent
,
const
QVariantList
&
args
);
...
...
@@ -51,6 +53,7 @@ public:
Q_SIGNALS:
void
modelUpdated
();
void
configurationChanged
();
void
needsToBeSquareChanged
();
public:
// WeatherPopupApplet API
QVariantMap
configValues
()
const
override
;
...
...
@@ -77,6 +80,7 @@ private:
QVariantList
m_noticesModel
;
QVariantMap
m_configuration
;
bool
m_needsToBeSquare
=
false
;
};
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment