@ -33,8 +33,8 @@ import "../code/ColorizerTools.js" as ColorizerTools
Item {
id: rulerItem
width: root . isHorizontal ? root.m axLength : thickness
height: root . isVertical ? root.m axLength : thickness
width: root . isHorizontal ? userM axLength : thickness
height: root . isVertical ? userM axLength : thickness
opacity: root . editMode ? 1 : 0
@ -45,6 +45,14 @@ Item{
readonly property string tooltip: i18nc ( "maximum length tooltip, %0% is maximum length percentage" , "You can use mouse wheel to change maximum length of %0%" ) . arg ( plasmoid . configuration . maxLength )
readonly property int userMaxLength: {
if ( root . isHorizontal ) {
return root . width * ( plasmoid . configuration . maxLength / 100 ) ;
} else {
return root . height * ( plasmoid . configuration . maxLength / 100 ) ;
}
}
x: {
if ( root . isHorizontal ) {
return xL ;
@ -70,7 +78,7 @@ Item{
}
property int length: root. m axLength
property int length: userM axLength
property int rMargin: 3
property int xL: 0