Commit 1e0a54f8 authored by Thomas BOUTROUE's avatar Thomas BOUTROUE

Fix issues in Balloon and TextButton

parent 6c7162bd
Pipeline #998 passed with stage
in 7 seconds
......@@ -38,6 +38,7 @@ MouseArea {
horizontalAlignment: Text.AlignJustify;
emphasis: true;
font.pixelSize: Style.fontSizeSmall;
ExtraAnchors.horizontalFill: parent;
}
TextLabel {
id: lblContent;
......@@ -45,6 +46,7 @@ MouseArea {
wrapMode: Text.WrapAtWordBoundaryOrAnywhere;
horizontalAlignment: Text.AlignJustify;
font.pixelSize: Style.fontSizeSmall;
ExtraAnchors.horizontalFill: parent;
}
Loader {
id: img;
......
import QtQuick 2.6;
import QtQmlTricks 3.0;
MouseArea {
Item {
id: self;
width: implicitWidth;
height: implicitHeight;
hoverEnabled: Style.useHovering;
implicitWidth: contentWidth;
implicitHeight: contentHeight;
states: [
......@@ -141,8 +140,9 @@ MouseArea {
AutoRepeatableClicker {
id: clicker;
visible: clickable;
visible: self.clickable;
enabled: self.enabled;
hoverEnabled: Style.useHovering;
anchors.fill: parent;
onClicked: {
self.clicked (isRepeated);
......@@ -150,28 +150,28 @@ MouseArea {
}
Binding {
target: ico.item;
when: (autoColorIcon && ico.item && "color" in ico.item);
when: (self.autoColorIcon && ico.item && "color" in ico.item);
property: "color";
value: textColor;
value: self.textColor;
}
Rectangle {
id: rect;
width: Math.round (parent.width);
height: Math.round (parent.height);
width: Math.round (self.width);
height: Math.round (self.height);
enabled: self.enabled;
radius: Style.roundness;
visible: clickable;
visible: self.clickable;
antialiasing: radius;
gradient: (enabled
? (checked
gradient: (self.enabled
? (self.checked
? Style.gradientChecked ()
: (pressed
? Style.gradientPressed (Style.opacify (backColor, flat ? 0.35 : 1.0))
: Style.gradientIdle (flat ? Style.colorNone : Qt.lighter (backColor, hovered ? 1.15 : 1.0))))
: Style.gradientDisabled (flat ? Style.colorNone : Style.colorClickable));
: (self.pressed
? Style.gradientPressed (Style.opacify (self.backColor, self.flat ? 0.35 : 1.0))
: Style.gradientIdle (self.flat ? Style.colorNone : Qt.lighter (self.backColor, self.hovered ? 1.15 : 1.0))))
: Style.gradientDisabled (self.flat ? Style.colorNone : Style.colorClickable));
border {
width: (!flat || pressed || checked || hovered ? Style.lineSize : 0);
color: (checked ? Style.colorSelection : Style.colorBorder);
width: (!self.flat || self.pressed || self.checked || self.hovered ? Style.lineSize : 0);
color: (self.checked ? Style.colorSelection : Style.colorBorder);
}
anchors.fill: parent;
}
......@@ -184,12 +184,12 @@ MouseArea {
}
TextLabel {
id: lbl;
color: (enabled
? (checked
color: (self.enabled
? (self.checked
? (Style.useDarkTheme
? Qt.lighter (Style.colorSelection)
: Qt.darker (Style.colorSelection))
: textColor)
: self.textColor)
: Style.colorBorder);
enabled: self.enabled;
visible: (text !== "");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment