[ui] min size & font

This commit is contained in:
jscampucci 2024-06-11 16:16:40 +02:00
parent 7e83732c56
commit 080488c8a2
30 changed files with 101 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
assets/images/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
assets/images/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

View File

@ -2,10 +2,23 @@ import 'package:flutter/material.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:notube/wrapper.dart';
import 'package:notube/constants.dart';
import 'package:window_manager/window_manager.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await EasyLocalization.ensureInitialized();
await windowManager.ensureInitialized();
WindowOptions windowOptions = WindowOptions(
size: Size(800, 600),
minimumSize: Size(320, 400),
title: 'NoTube',
);
windowManager.waitUntilReadyToShow(windowOptions, () async {
await windowManager.setIcon('assets/images/icon.png');
await windowManager.show();
await windowManager.focus();
});
runApp(
EasyLocalization(
@ -24,6 +37,7 @@ class NoTubeApp extends StatelessWidget {
return MaterialApp(
title: 'NoTube',
theme: ThemeData(
fontFamily: 'Poppins',
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(
seedColor: colorMainRed, brightness: Brightness.dark),

View File

@ -7,9 +7,17 @@
#include "generated_plugin_registrant.h"
#include <flutter_localization/flutter_localization_plugin.h>
#include <screen_retriever/screen_retriever_plugin.h>
#include <window_manager/window_manager_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) flutter_localization_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterLocalizationPlugin");
flutter_localization_plugin_register_with_registrar(flutter_localization_registrar);
g_autoptr(FlPluginRegistrar) screen_retriever_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin");
screen_retriever_plugin_register_with_registrar(screen_retriever_registrar);
g_autoptr(FlPluginRegistrar) window_manager_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "WindowManagerPlugin");
window_manager_plugin_register_with_registrar(window_manager_registrar);
}

View File

@ -4,6 +4,8 @@
list(APPEND FLUTTER_PLUGIN_LIST
flutter_localization
screen_retriever
window_manager
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST

View File

@ -7,10 +7,14 @@ import Foundation
import flutter_localization
import path_provider_foundation
import screen_retriever
import shared_preferences_foundation
import window_manager
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FlutterLocalizationPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalizationPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin"))
}

View File

@ -309,6 +309,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
screen_retriever:
dependency: transitive
description:
name: screen_retriever
sha256: "6ee02c8a1158e6dae7ca430da79436e3b1c9563c8cf02f524af997c201ac2b90"
url: "https://pub.dev"
source: hosted
version: "0.1.9"
shared_preferences:
dependency: transitive
description:
@ -458,6 +466,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.5.1"
window_manager:
dependency: "direct main"
description:
name: window_manager
sha256: "8699323b30da4cdbe2aa2e7c9de567a6abd8a97d9a5c850a3c86dcd0b34bbfbf"
url: "https://pub.dev"
source: hosted
version: "0.3.9"
xdg_directories:
dependency: transitive
description:

View File

@ -19,6 +19,7 @@ dependencies:
get: ^4.6.6
process_run: ^0.14.2
path_provider: ^2.1.3
window_manager: ^0.3.9
dev_dependencies:
flutter_test:
@ -27,6 +28,54 @@ dev_dependencies:
flutter_lints: ^2.0.0
flutter:
fonts:
- family: Poppins
fonts:
- asset: assets/fonts/Poppins-Thin.ttf
weight: 100
- asset: assets/fonts/Poppins-ExtraLight.ttf
weight: 200
- asset: assets/fonts/Poppins-Light.ttf
weight: 300
- asset: assets/fonts/Poppins-Regular.ttf
weight: 400
- asset: assets/fonts/Poppins-Medium.ttf
weight: 500
- asset: assets/fonts/Poppins-SemiBold.ttf
weight: 600
- asset: assets/fonts/Poppins-Bold.ttf
weight: 700
- asset: assets/fonts/Poppins-ExtraBold.ttf
weight: 800
- asset: assets/fonts/Poppins-Black.ttf
weight: 900
- asset: assets/fonts/Poppins-Thin.ttf
weight: 100
style: italic
- asset: assets/fonts/Poppins-ExtraLight.ttf
weight: 200
style: italic
- asset: assets/fonts/Poppins-Light.ttf
weight: 300
style: italic
- asset: assets/fonts/Poppins-Italic.ttf
weight: 400
style: italic
- asset: assets/fonts/Poppins-MediumItalic.ttf
weight: 500
style: italic
- asset: assets/fonts/Poppins-SemiBoldItalic.ttf
weight: 600
style: italic
- asset: assets/fonts/Poppins-BoldItalic.ttf
weight: 700
style: italic
- asset: assets/fonts/Poppins-ExtraBoldItalic.ttf
weight: 800
style: italic
- asset: assets/fonts/Poppins-BlackItalic.ttf
weight: 900
style: italic
uses-material-design: true
assets:

View File

@ -7,8 +7,14 @@
#include "generated_plugin_registrant.h"
#include <flutter_localization/flutter_localization_plugin_c_api.h>
#include <screen_retriever/screen_retriever_plugin.h>
#include <window_manager/window_manager_plugin.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
FlutterLocalizationPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FlutterLocalizationPluginCApi"));
ScreenRetrieverPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ScreenRetrieverPlugin"));
WindowManagerPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("WindowManagerPlugin"));
}

View File

@ -4,6 +4,8 @@
list(APPEND FLUTTER_PLUGIN_LIST
flutter_localization
screen_retriever
window_manager
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB