From 7c3b50276718cf8d47600c884183498440451dbb Mon Sep 17 00:00:00 2001 From: omega ui Date: Sat, 23 Dec 2023 14:06:21 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Added=20Meta=20Info=20and=20Links?= =?UTF-8?q?=20in=20Power=20Mode=20Settings.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dialogs/power_mode_settings.dart | 70 ++++++++++++++++--- linux/my_application.cc | 4 +- 2 files changed, 61 insertions(+), 13 deletions(-) diff --git a/lib/app/powermode/presentation/dialogs/power_mode_settings.dart b/lib/app/powermode/presentation/dialogs/power_mode_settings.dart index be6bafb..02d44c4 100644 --- a/lib/app/powermode/presentation/dialogs/power_mode_settings.dart +++ b/lib/app/powermode/presentation/dialogs/power_mode_settings.dart @@ -3,10 +3,11 @@ import 'package:cliptopia/app/settings/presentation/widgets/option.dart'; import 'package:cliptopia/config/assets/app_artworks.dart'; import 'package:cliptopia/config/assets/app_icons.dart'; import 'package:cliptopia/config/themes/app_theme.dart'; +import 'package:cliptopia/constants/meta_info.dart'; import 'package:cliptopia/core/storage/storage.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:gap/gap.dart'; +import 'package:url_launcher/url_launcher_string.dart'; void showPowerSettings(BuildContext context) { showDialog( @@ -73,17 +74,64 @@ class _PowerModeSettingsState extends State { ], ), ), - Padding( - padding: const EdgeInsets.only(right: 32.0, top: 20), - child: IconButton( - onPressed: () { - Navigator.pop(context); - }, - icon: Icon( - Icons.close, - color: AppTheme.foreground, + Row( + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.only(top: 20.0), + child: Tooltip( + message: "Current App Version", + child: Text( + MetaInfo.version, + style: AppTheme.fontSize(14).makeMedium(), + ), + ), ), - ), + const Gap(10), + Padding( + padding: const EdgeInsets.only(top: 20.0), + child: IconButton( + tooltip: "See Releases on GitHub", + onPressed: () { + launchUrlString( + "https://github.com/omegaui/cliptopia/releases"); + }, + icon: Image.asset( + AppIcons.bulb, + width: 32, + ), + ), + ), + const Gap(10), + Padding( + padding: const EdgeInsets.only(top: 20.0), + child: IconButton( + tooltip: "View Project on GitHub", + onPressed: () { + launchUrlString( + "https://github.com/omegaui/cliptopia"); + }, + icon: Image.asset( + AppIcons.github, + width: 32, + ), + ), + ), + const Gap(10), + Padding( + padding: + const EdgeInsets.only(right: 32.0, top: 20), + child: IconButton( + onPressed: () { + Navigator.pop(context); + }, + icon: Icon( + Icons.close, + color: AppTheme.foreground, + ), + ), + ), + ], ), ], ), diff --git a/linux/my_application.cc b/linux/my_application.cc index 40a0364..a9fb47f 100644 --- a/linux/my_application.cc +++ b/linux/my_application.cc @@ -66,8 +66,8 @@ static void my_application_activate(GApplication* application) { gtk_window_set_resizable(window, FALSE); if (global_argv != NULL && - hasFlag("--silent", length, global_argv) && - hasFlag("--power", length, global_argv)) { + hasFlag("--silent", length, global_argv) && + hasFlag("--power", length, global_argv)) { GdkScreen* screen = gtk_window_get_screen(window); GdkRectangle monitor_rect; gdk_screen_get_monitor_geometry(screen, 0, &monitor_rect);