[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [gcompris] src/core: AnswerButton, answerbutton width set according to content width
From: Rajdeep Kaur <rajdeep51994 () gmail ! com>
Date: 2016-08-21 7:07:08
Message-ID: E1bbMqa-0007UX-Tt () code ! kde ! org
[Download RAW message or body]
Git commit 478832fc0d04e6b078cbfacb158ab435ca31ae5a by Rajdeep Kaur.
Committed on 21/08/2016 at 07:06.
Pushed by rkaur into branch 'master'.
AnswerButton, answerbutton width set according to content width
M +2 -1 src/core/AnswerButton.qml
http://commits.kde.org/gcompris/478832fc0d04e6b078cbfacb158ab435ca31ae5a
diff --git a/src/core/AnswerButton.qml b/src/core/AnswerButton.qml
index 189600e..a7a2a15 100644
--- a/src/core/AnswerButton.qml
+++ b/src/core/AnswerButton.qml
@@ -82,7 +82,8 @@ Item {
anchors.verticalCenter: parent.verticalCenter
// We need to manually horizonally center the text, because in wro=
ngAnswerAnimation,
// the x of the text is changed, which would not work if we use an=
anchor layout.
- property int horizontallyCenteredX: (button.width - width) >> 1;
+ property int horizontallyCenteredX: (button.width - contentWidth) =
>> 1;
+ width: button.width
x: horizontallyCenteredX;
fontSizeMode: Text.Fit
font.bold: true
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic