[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [gcompris] src/activities/chess: chess, some minor layout adjustments
From: Bruno Coudoin <bruno.coudoin () gcompris ! net>
Date: 2015-08-31 21:47:33
Message-ID: E1ZWWvN-0000rO-9k () scm ! kde ! org
[Download RAW message or body]
Git commit 2673e24fbdf02218b6983de1ffca6ffd995c38bc by Bruno Coudoin.
Committed on 31/08/2015 at 21:42.
Pushed by bcoudoin into branch 'master'.
chess, some minor layout adjustments
M +11 -3 src/activities/chess/Chess.qml
http://commits.kde.org/gcompris/2673e24fbdf02218b6983de1ffca6ffd995c38bc
diff --git a/src/activities/chess/Chess.qml b/src/activities/chess/Chess.qml
index 062a4ae..cba75ec 100644
--- a/src/activities/chess/Chess.qml
+++ b/src/activities/chess/Chess.qml
@@ -64,7 +64,7 @@ ActivityBase {
property alias background: background
property alias bar: bar
property alias bonus: bonus
- property int cellSize: Math.min(background.width / (8 + 1),
+ property int cellSize: Math.min(background.width / (8 + 2),
background.height / (8 + 3))
property variant fen: activity.fen
property bool twoPlayer: activity.twoPlayers
@@ -89,6 +89,7 @@ ActivityBase {
top: parent.top
topMargin: items.cellSize / 2
leftMargin: 10 * ApplicationInfo.ratio
+ rightMargin: 10 * ApplicationInfo.ratio
}
columns: 3
rows: 1
@@ -100,12 +101,19 @@ ActivityBase {
Column {
id: controls
spacing: 10
- width: undo.width + (background.width * 0.9 - undo.width -=
chessboard.width) / 2
+ anchors {
+ leftMargin: 10
+ rightMargin: 10
+ }
+ width: Math.max(undo.width * 1.2,
+ Math.min(
+ (background.width * 0.9 - undo.width -=
chessboard.width),
+ (background.width - chessboard.width) =
/ 2))
=
GCText {
color: "black"
anchors.horizontalCenter: parent.horizontalCenter
- width: undo.width * 1.2
+ width: parent.width
fontSize: smallSize
text: items.message
horizontalAlignment: Text.AlignHCenter
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic