Skip to content

Commit

Permalink
Fixed a missing top bar
Browse files Browse the repository at this point in the history
  • Loading branch information
K3vinb5 committed Jun 13, 2024
1 parent 3b8e224 commit 16443f4
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 13 deletions.
30 changes: 24 additions & 6 deletions lib/screens/anime_user_lists_screen.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:math';
import 'package:bitsdojo_window/bitsdojo_window.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:unyo/models/models.dart';
Expand Down Expand Up @@ -187,12 +188,29 @@ class _AnimeUserListsScreenState extends State<AnimeUserListsScreen>
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
IconButton(
icon: const Icon(Icons.arrow_back),
color: Colors.white,
onPressed: () {
goTo(1);
},
Stack(
children: [
Align(
alignment: Alignment.topCenter,
child: WindowTitleBarBox(
child: Row(
children: [
Expanded(
child: MoveWindow(),
),
const WindowButtons(),
],
),
),
),
IconButton(
icon: const Icon(Icons.arrow_back),
color: Colors.white,
onPressed: () {
goTo(1);
},
),
],
),
Expanded(
child: Align(
Expand Down
33 changes: 26 additions & 7 deletions lib/screens/manga_user_lists_screen.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:math';
import 'package:bitsdojo_window/bitsdojo_window.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:unyo/models/models.dart';
Expand Down Expand Up @@ -45,7 +46,8 @@ class _MangaUserListsScreenState extends State<MangaUserListsScreen>
//TODO There might be a mistake in the - 2
int rowWidgetNum = totalWidth ~/
(min(max(calculatedWidth, minimumWidth), maximumWidth) +
2 * horizontalPadding) - 2;
2 * horizontalPadding) -
2;
for (int i = 0; i < mangaList.length; i++) {
int actualIndex = i * rowWidgetNum;
//NOTE there is at least x more elements
Expand Down Expand Up @@ -176,12 +178,29 @@ class _MangaUserListsScreenState extends State<MangaUserListsScreen>
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
IconButton(
icon: const Icon(Icons.arrow_back),
color: Colors.white,
onPressed: () {
goTo(1);
},
Stack(
children: [
Align(
alignment: Alignment.topCenter,
child: WindowTitleBarBox(
child: Row(
children: [
Expanded(
child: MoveWindow(),
),
const WindowButtons(),
],
),
),
),
IconButton(
icon: const Icon(Icons.arrow_back),
color: Colors.white,
onPressed: () {
goTo(1);
},
),
],
),
Expanded(
child: Align(
Expand Down

0 comments on commit 16443f4

Please sign in to comment.