Skip to content

Commit

Permalink
fix(graph): use right width and reduce default font size
Browse files Browse the repository at this point in the history
Fix #17
  • Loading branch information
orblazer committed Dec 19, 2021
1 parent f4b05d7 commit a74fd0f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions package/contents/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ Item {
property int itemMargin: plasmoid.configuration.graphMargin
property double parentWidth: parent === null ? 0 : parent.width
property double parentHeight: parent === null ? 0 : parent.height
property double initWidth: vertical ? ( verticalLayout ? parentWidth : (parentWidth - itemMargin) / 2 ) : ( verticalLayout ? (parentHeight - itemMargin) / 2 : parentHeight )
property double itemWidth: plasmoid.configuration.customGraphWidth ? plasmoid.configuration.graphWidth : initWidth * 1.4
property double initWidth: vertical ? (verticalLayout ? parentWidth : (parentWidth - itemMargin) / 2) : (verticalLayout ? (parentHeight - itemMargin) / 2 : parentHeight)
property double itemWidth: plasmoid.configuration.customGraphWidth ? plasmoid.configuration.graphWidth : (initWidth * (verticalLayout ? 1 : 1.4))
property double itemHeight: plasmoid.configuration.customGraphHeight ? plasmoid.configuration.graphHeight : initWidth
property double fontPixelSize: itemHeight * fontScale
property double fontPixelSize: verticalLayout ? (itemHeight / 1.4 * fontScale) : (itemHeight * fontScale)
property double widgetWidth: !verticalLayout ? (itemWidth*containerCount + itemMargin*containerCount) : itemWidth
property double widgetHeight: verticalLayout ? (itemHeight*containerCount + itemMargin*containerCount) : itemHeight

Layout.preferredWidth: widgetWidth
Layout.preferredWidth: widgetWidth
Layout.maximumWidth: widgetWidth
Layout.preferredHeight: widgetHeight
Layout.maximumHeight: widgetHeight
Expand Down

0 comments on commit a74fd0f

Please sign in to comment.