diff --git a/package/contents/config/main.xml b/package/contents/config/main.xml index 5c084ec..352f289 100644 --- a/package/contents/config/main.xml +++ b/package/contents/config/main.xml @@ -23,6 +23,10 @@ + + false + + 10 diff --git a/package/contents/ui/config/ConfigAppearance.qml b/package/contents/ui/config/ConfigAppearance.qml index bdb59ce..ffe9d9a 100644 --- a/package/contents/ui/config/ConfigAppearance.qml +++ b/package/contents/ui/config/ConfigAppearance.qml @@ -12,6 +12,7 @@ KCM.AbstractKCM { Kirigami.ColumnView.fillWidth: true // Chart + property alias cfg_fillPanel: fillPanel.checked property alias cfg_historyAmount: historyAmount.realValue property alias cfg_customGraphWidth: graphWidth.customized property alias cfg_graphWidth: graphWidth.value @@ -68,6 +69,14 @@ KCM.AbstractKCM { // Charts Kirigami.FormLayout { + QQC2.CheckBox { + id: fillPanel + text: i18n("Fill panel?") + + QQC2.ToolTip.visible: hovered + QQC2.ToolTip.text: i18nc("@info:tooltip", "This allow graphs to take all panel with /height") + } + RMControls.PredefinedSpinBox { id: historyAmount Kirigami.FormData.label: i18n("History amount:") diff --git a/package/contents/ui/config/ConfigGraph.qml b/package/contents/ui/config/ConfigGraph.qml index 84314d6..990d1c1 100644 --- a/package/contents/ui/config/ConfigGraph.qml +++ b/package/contents/ui/config/ConfigGraph.qml @@ -19,7 +19,7 @@ KCM.ScrollViewKCM { // TODO: handle "_v" changes //#region // HACK: Present to suppress errors (https://bugs.kde.org/show_bug.cgi?id=484541) - property var cfg_verticalLayout + property var cfg_fillPanel property var cfg_historyAmount property var cfg_customGraphWidth property var cfg_graphWidth diff --git a/package/contents/ui/config/ConfigMisc.qml b/package/contents/ui/config/ConfigMisc.qml index d4f9228..aadd28e 100644 --- a/package/contents/ui/config/ConfigMisc.qml +++ b/package/contents/ui/config/ConfigMisc.qml @@ -13,7 +13,7 @@ KCM.SimpleKCM { //#region // HACK: Present to suppress errors (https://bugs.kde.org/show_bug.cgi?id=484541) property var cfg_graphs - property var cfg_verticalLayout + property var cfg_fillPanel property var cfg_historyAmount property var cfg_customGraphWidth property var cfg_graphWidth diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml index cf8ab7f..ab1bad3 100644 --- a/package/contents/ui/main.qml +++ b/package/contents/ui/main.qml @@ -6,9 +6,6 @@ import org.kde.plasma.plasma5support as Plasma5Support PlasmoidItem { id: root - // Margin for prevent "invsible" 0 and full lines - anchors.topMargin: 1 - anchors.bottomMargin: 1 readonly property int graphVersion: 1 //? Bump when some settings changes in "graphs" structure readonly property bool isVertical: { @@ -39,7 +36,11 @@ PlasmoidItem { Plasmoid.backgroundHints: PlasmaCore.Types.DefaultBackground | PlasmaCore.Types.ConfigurableBackground Plasmoid.configurationRequired: graphsModel.length === 0 // Check if graphs is valid and have some items preferredRepresentation: Plasmoid.configurationRequired ? compactRepresentation : fullRepresentation // Show graphs only if at least 1 is present, otherwise ask to configure - Plasmoid.constraintHints: Plasmoid.CanFillArea // Allow widget to take all height/width + Plasmoid.constraintHints: Plasmoid.configuration.fillPanel ? Plasmoid.CanFillArea : Plasmoid.NoHint// Allow widget to take all height/width + + // Margin for prevent "invsible" 0 and full lines when fill panel + anchors.topMargin: Plasmoid.configuration.fillPanel ? 1 : 0 + anchors.bottomMargin: Plasmoid.configuration.fillPanel ? 1 : 0 // Content fullRepresentation: MouseArea {