mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-26 00:29:20 +08:00
Revert "macos: Remove the ugly title bar of the window"
This reverts commit bdf284311caa2f1a4d8b86c170251406fc661fbd. The title bar cannot be clicked and dragged with this change. It's super annoying.
This commit is contained in:
20
lib/app.dart
20
lib/app.dart
@ -4,7 +4,6 @@ import 'dart:io' show Platform;
|
|||||||
import 'package:flutter/foundation.dart' as foundation;
|
import 'package:flutter/foundation.dart' as foundation;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:bitsdojo_window/bitsdojo_window.dart';
|
|
||||||
import 'package:device_info/device_info.dart';
|
import 'package:device_info/device_info.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:easy_localization_loader/easy_localization_loader.dart';
|
import 'package:easy_localization_loader/easy_localization_loader.dart';
|
||||||
@ -314,7 +313,7 @@ class _JournalAppState extends State<JournalApp> {
|
|||||||
);
|
);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var app = MaterialApp(
|
return MaterialApp(
|
||||||
key: const ValueKey("App"),
|
key: const ValueKey("App"),
|
||||||
navigatorKey: _navigatorKey,
|
navigatorKey: _navigatorKey,
|
||||||
title: 'GitJournal',
|
title: 'GitJournal',
|
||||||
@ -344,23 +343,6 @@ class _JournalAppState extends State<JournalApp> {
|
|||||||
return r;
|
return r;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (Platform.isLinux || Platform.isWindows) {
|
|
||||||
return WindowBorder(
|
|
||||||
color: app.theme!.primaryColor,
|
|
||||||
child: app,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (Platform.isMacOS) {
|
|
||||||
return Container(
|
|
||||||
color: app.theme!.primaryColor,
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(0, 24.0, 0, 0),
|
|
||||||
child: app,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return app;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
import bitsdojo_window_macos
|
|
||||||
import connectivity_macos
|
import connectivity_macos
|
||||||
import package_info
|
import package_info
|
||||||
import package_info_plus_macos
|
import package_info_plus_macos
|
||||||
@ -16,7 +15,6 @@ import sqflite
|
|||||||
import url_launcher_macos
|
import url_launcher_macos
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
BitsdojoWindowPlugin.register(with: registry.registrar(forPlugin: "BitsdojoWindowPlugin"))
|
|
||||||
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
|
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
|
||||||
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
|
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
|
||||||
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
|
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- bitsdojo_window_macos (0.0.1):
|
|
||||||
- FlutterMacOS
|
|
||||||
- connectivity_macos (0.0.1):
|
- connectivity_macos (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- Reachability
|
- Reachability
|
||||||
@ -31,7 +29,6 @@ PODS:
|
|||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- bitsdojo_window_macos (from `Flutter/ephemeral/.symlinks/plugins/bitsdojo_window_macos/macos`)
|
|
||||||
- connectivity_macos (from `Flutter/ephemeral/.symlinks/plugins/connectivity_macos/macos`)
|
- connectivity_macos (from `Flutter/ephemeral/.symlinks/plugins/connectivity_macos/macos`)
|
||||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||||
- package_info (from `Flutter/ephemeral/.symlinks/plugins/package_info/macos`)
|
- package_info (from `Flutter/ephemeral/.symlinks/plugins/package_info/macos`)
|
||||||
@ -49,8 +46,6 @@ SPEC REPOS:
|
|||||||
- Sentry
|
- Sentry
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
bitsdojo_window_macos:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/bitsdojo_window_macos/macos
|
|
||||||
connectivity_macos:
|
connectivity_macos:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/connectivity_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/connectivity_macos/macos
|
||||||
FlutterMacOS:
|
FlutterMacOS:
|
||||||
@ -71,7 +66,6 @@ EXTERNAL SOURCES:
|
|||||||
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
bitsdojo_window_macos: 7e9b1bbb09bdce418d9657ead7fc9d824203ff0d
|
|
||||||
connectivity_macos: 9f30e9d0e67a0bc08a0c563ee82310b51ca6e818
|
connectivity_macos: 9f30e9d0e67a0bc08a0c563ee82310b51ca6e818
|
||||||
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
|
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
|
||||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
import Cocoa
|
import Cocoa
|
||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
import bitsdojo_window_macos
|
|
||||||
|
|
||||||
class MainFlutterWindow: BitsdojoWindow {
|
|
||||||
|
|
||||||
override func bitsdojo_window_configure() -> UInt {
|
|
||||||
return BDW_CUSTOM_FRAME
|
|
||||||
}
|
|
||||||
|
|
||||||
|
class MainFlutterWindow: NSWindow {
|
||||||
override func awakeFromNib() {
|
override func awakeFromNib() {
|
||||||
let flutterViewController = FlutterViewController.init()
|
let flutterViewController = FlutterViewController.init()
|
||||||
let windowFrame = self.frame
|
let windowFrame = self.frame
|
||||||
|
35
pubspec.lock
35
pubspec.lock
@ -64,41 +64,6 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
bitsdojo_window:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: bitsdojo_window
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "0.1.1+1"
|
|
||||||
bitsdojo_window_linux:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: bitsdojo_window_linux
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "0.1.1"
|
|
||||||
bitsdojo_window_macos:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: bitsdojo_window_macos
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "0.1.0"
|
|
||||||
bitsdojo_window_platform_interface:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: bitsdojo_window_platform_interface
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "0.1.0"
|
|
||||||
bitsdojo_window_windows:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: bitsdojo_window_windows
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "0.1.0"
|
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -77,7 +77,6 @@ dependencies:
|
|||||||
yaml_serializer: ^0.0.11
|
yaml_serializer: ^0.0.11
|
||||||
collection: ^1.15.0-nullsafety.4
|
collection: ^1.15.0-nullsafety.4
|
||||||
flex_color_scheme: ^2.1.1
|
flex_color_scheme: ^2.1.1
|
||||||
bitsdojo_window: ^0.1.1+1
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
#flutter_driver:
|
#flutter_driver:
|
||||||
|
Reference in New Issue
Block a user