Skip to content

Commit

Permalink
fix layout on stihi3
Browse files Browse the repository at this point in the history
  • Loading branch information
mytja committed Nov 3, 2023
1 parent 24d4a09 commit 6f8eb59
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tarok/lib/game/game.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Game extends StatelessWidget {
final m = min(fullHeight, fullWidth);
const cardK = 0.38;
final leftFromTop = fullHeight * 0.3;
final cardToWidth = fullWidth * 0.35 - (m * cardK * 0.57 * 0.6);
final cardToWidth = fullWidth * 0.4 - (m * cardK * 0.57 * 0.6);
final center = cardToWidth - m * cardK * 0.57 * 0.6;
final userSquareSize = min(fullHeight / 5, 100.0).toDouble();
final border = (fullWidth / 800);
Expand Down
30 changes: 23 additions & 7 deletions tarok/lib/game/game_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2158,7 +2158,11 @@ class GameController extends GetxController {
height: cardHeight,
width: cardWidth,
),
e.widget,
SizedBox(
height: cardHeight,
width: cardWidth,
child: Center(child: e.widget),
),
],
),
),
Expand All @@ -2174,9 +2178,9 @@ class GameController extends GetxController {
top: stihBoolValues[1] != true
? leftFromTop - (cardHeight * 0.5) - 100
: leftFromTop - (cardHeight * 0.5),
left: stihBoolValues[1] != true
? cardToWidth + cardHeight / 3 + 100
: cardToWidth + cardHeight / 3,
right: stihBoolValues[1] != true
? fullWidth * (1 / 6 + 0.25)
: fullWidth * (1 / 6 + 0.25) + 100,
height: cardHeight,
child: AnimatedRotation(
duration: const Duration(milliseconds: ANIMATION_TIME),
Expand All @@ -2190,7 +2194,11 @@ class GameController extends GetxController {
height: cardHeight,
width: cardWidth,
),
e.widget,
SizedBox(
height: cardHeight,
width: cardWidth,
child: Center(child: e.widget),
),
],
),
),
Expand All @@ -2216,7 +2224,11 @@ class GameController extends GetxController {
height: cardHeight,
width: cardWidth,
),
e.widget,
SizedBox(
height: cardHeight,
width: cardWidth,
child: Center(child: e.widget),
),
],
),
),
Expand Down Expand Up @@ -2245,7 +2257,11 @@ class GameController extends GetxController {
height: cardHeight,
width: cardWidth,
),
e.widget,
SizedBox(
height: cardHeight,
width: cardWidth,
child: Center(child: e.widget),
),
],
),
),
Expand Down

0 comments on commit 6f8eb59

Please sign in to comment.