Skip to content

Commit

Permalink
Completely hide widget if there is nothing to show
Browse files Browse the repository at this point in the history
  • Loading branch information
luisbocanegra committed Oct 3, 2024
1 parent e22dc63 commit ae06970
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions package/contents/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ PlasmoidItem {
property bool widgetHovered: widgetHoverHandler.hovered
property bool vertical: plasmoid.formFactor === PlasmaCore.Types.Vertical
property bool leftEdgeLocation: plasmoid.location === PlasmaCore.Types.LeftEdge
property bool hideWidget: !tasksModel.hasActiveWindow && plasmoid.configuration.widgetElementsDisabledMode === WidgetElement.DisabledMode.Hide

signal invokeKWinShortcut(string shortcut)
signal widgetElementsLayoutUpdated

Plasmoid.constraintHints: Plasmoid.CanFillArea
Plasmoid.status: hideWidget
? PlasmaCore.Types.HiddenStatus
: PlasmaCore.Types.ActiveStatus
Layout.fillWidth: !vertical && plasmoid.configuration.widgetFillWidth
Layout.fillHeight: vertical && plasmoid.configuration.widgetFillWidth
preferredRepresentation: fullRepresentation
Expand Down

0 comments on commit ae06970

Please sign in to comment.