Skip to content

Commit

Permalink
Limit size for now, add ontap
Browse files Browse the repository at this point in the history
  • Loading branch information
Feichtmeier committed Apr 21, 2024
1 parent c6f05ad commit a325bb2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion lib/src/app/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,14 @@ class MasterDetailPage extends StatelessWidget with WatchItMixin {
final location = favLocations.elementAt(index);
return YaruMasterTile(
// TODO: assign pages to location
onTap: () {},
onTap: () => model.init(cityName: location),
selected: lastLocation == location,
title: Text(
favLocations.elementAt(index),
),
trailing: favLocationsLength > 1
? IconButton(
padding: EdgeInsets.zero,
onPressed: () {
model.removeFavLocation(location).then(
(value) => model.init(
Expand Down
7 changes: 5 additions & 2 deletions lib/src/weather/weather_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ class WeatherPage extends StatelessWidget with WatchItMixin {
),
Scaffold(
backgroundColor: Colors.transparent,
appBar: const YaruWindowTitleBar(
appBar: YaruWindowTitleBar(
leading: Navigator.of(context).canPop()
? const YaruBackButton()
: null,
backgroundColor: Colors.transparent,
border: BorderSide.none,
),
Expand All @@ -53,7 +56,7 @@ class WeatherPage extends StatelessWidget with WatchItMixin {
Expanded(
child: TodayTile(
width: mq.size.width,
padding: EdgeInsets.zero,
padding: const EdgeInsets.all(kYaruPagePadding),
day: 'Now',
height: mq.size.height,
position: model.cityFromPosition,
Expand Down
4 changes: 2 additions & 2 deletions linux/my_application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ static void my_application_activate(GApplication* application) {
gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(box));

GdkGeometry geometry_min;
geometry_min.min_width = 680;
geometry_min.min_height = 600;
geometry_min.min_width = 1200;
geometry_min.min_height = 800;
gtk_window_set_geometry_hints(window, nullptr, &geometry_min, GDK_HINT_MIN_SIZE);
gtk_window_set_default_size(window, 1200, 800);

Expand Down

0 comments on commit a325bb2

Please sign in to comment.