NPill: fixed look at high scaling
This commit is contained in:
parent
d4f6462e8a
commit
993a7965fd
1 changed files with 4 additions and 5 deletions
|
|
@ -39,9 +39,9 @@ Item {
|
||||||
property bool shouldAnimateHide: false
|
property bool shouldAnimateHide: false
|
||||||
|
|
||||||
// Exposed width logic
|
// Exposed width logic
|
||||||
readonly property int pillHeight: Style.baseWidgetSize * sizeRatio * scaling
|
readonly property int iconSize: Math.round(Style.baseWidgetSize * sizeRatio * scaling)
|
||||||
readonly property int iconSize: Style.baseWidgetSize * sizeRatio * scaling
|
readonly property int pillHeight: iconSize
|
||||||
readonly property int pillPaddingHorizontal: Style.marginM * scaling
|
readonly property int pillPaddingHorizontal: Style.marginS * scaling
|
||||||
readonly property int pillOverlap: iconSize * 0.5
|
readonly property int pillOverlap: iconSize * 0.5
|
||||||
readonly property int maxPillWidth: Math.max(1, textItem.implicitWidth + pillPaddingHorizontal * 2 + pillOverlap)
|
readonly property int maxPillWidth: Math.max(1, textItem.implicitWidth + pillPaddingHorizontal * 2 + pillOverlap)
|
||||||
|
|
||||||
|
|
@ -108,8 +108,7 @@ Item {
|
||||||
border.width: Math.max(1, Style.borderS * scaling)
|
border.width: Math.max(1, Style.borderS * scaling)
|
||||||
border.color: forceOpen ? Qt.alpha(Color.mOutline, 0.5) : Color.transparent
|
border.color: forceOpen ? Qt.alpha(Color.mOutline, 0.5) : Color.transparent
|
||||||
|
|
||||||
anchors.left: rightOpen ? parent.left : undefined
|
x: rightOpen ? 0 : (parent.width - width)
|
||||||
anchors.right: rightOpen ? undefined : parent.right
|
|
||||||
|
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue