Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to fill the widget in the panels #321

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package/contents/config/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@
<entry name="showBackground" type="bool">
<default>true</default>
</entry>
<entry name="forceExpanded" type="bool">
<default>false</default>
</entry>
<entry name="topRowHeight" type="uint">
<default>100</default>
</entry>
Expand Down
5 changes: 5 additions & 0 deletions package/contents/ui/config/ConfigGeneral.qml
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,11 @@ ConfigPage {
Layout.fillWidth: true
text: i18n("Desktop Widget: Show background")
}
ConfigCheckBox {
configKey: 'forceExpanded'
Layout.fillWidth: true
text: i18n("Always keep expanded (panels)")
}
}

HeaderText {
Expand Down
5 changes: 3 additions & 2 deletions package/contents/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Item {
// * the timer widget is enabled since there's room in the top right
property bool isPinVisible: {
// plasmoid.location == PlasmaCore.Types.Floating when using plasmawindowed and when used as a desktop widget.
return plasmoid.location != PlasmaCore.Types.Floating // && plasmoid.configuration.widget_show_pin
return plasmoid.location != PlasmaCore.Types.Floating && !plasmoid.configuration.forceExpanded // && plasmoid.configuration.widget_show_pin
}
padding: {
if (isPinVisible && !(plasmoid.configuration.widgetShowTimer || plasmoid.configuration.widgetShowMeteogram)) {
Expand Down Expand Up @@ -194,7 +194,8 @@ Item {
Plasmoid.backgroundHints: plasmoid.configuration.showBackground ? PlasmaCore.Types.DefaultBackground : PlasmaCore.Types.NoBackground

property bool isDesktopContainment: plasmoid.location == PlasmaCore.Types.Floating
Plasmoid.preferredRepresentation: isDesktopContainment ? Plasmoid.fullRepresentation : Plasmoid.compactRepresentation
Plasmoid.preferredRepresentation: isDesktopContainment ? Plasmoid.fullRepresentation :
plasmoid.configuration.forceExpanded ? Plasmoid.fullRepresentation : Plasmoid.compactRepresentation
Plasmoid.compactRepresentation: clockComponent
Plasmoid.fullRepresentation: popupComponent

Expand Down