Skip to content

Commit

Permalink
⚡ Added Meta Info and Links in Power Mode Settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
omegaui committed Dec 23, 2023
1 parent ef187eb commit 7c3b502
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 13 deletions.
70 changes: 59 additions & 11 deletions lib/app/powermode/presentation/dialogs/power_mode_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -73,17 +74,64 @@ class _PowerModeSettingsState extends State<PowerModeSettings> {
],
),
),
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,
),
),
),
],
),
],
),
Expand Down
4 changes: 2 additions & 2 deletions linux/my_application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7c3b502

Please sign in to comment.