Compare commits

..

1 Commits

7 changed files with 18 additions and 21 deletions

View File

@ -58,6 +58,9 @@ class CwtchNotifier {
// EnvironmentConfig.debugLog("NewEvent $type $data");
switch (type) {
case "CwtchStarted":
if (data["Reload"] == "true" && profileCN.num > 0) {
// don't reload...
// unless we have loaded no profiles...then there isnt a risk and this

View File

@ -106,10 +106,9 @@ class FlwtchState extends State<Flwtch> with WindowListener {
// Cwtch.start can take time, we don't want it blocking first splash screen draw, so postpone a smidge to let splash render
Future.delayed(const Duration(milliseconds: 100), () {
print("initState delayed: invoking cwtch.Start()");
cwtch.Start().then((v) {
cwtch.getCwtchDir().then((dir) {
globalSettings.themeloader.LoadThemes(dir);
});
cwtch.Start();
cwtch.getCwtchDir().then((dir) {
globalSettings.themeloader.LoadThemes(dir);
});
});
print("initState: starting connectivityListener");

View File

@ -212,8 +212,7 @@ ThemeData mkThemeData(Settings opaque) {
actionsIconTheme: IconThemeData(
color: opaque.current().mainTextColor,
)),
listTileTheme: ListTileThemeData(
titleTextStyle: defaultFormLabelTextStyle.copyWith(color: opaque.current().mainTextColor), subtitleTextStyle: defaultMessageTextStyle.copyWith(color: opaque.current().mainTextColor)),
listTileTheme: ListTileThemeData(titleTextStyle: defaultFormLabelTextStyle, subtitleTextStyle: defaultMessageTextStyle),
iconButtonTheme: IconButtonThemeData(style: ButtonStyle(textStyle: MaterialStateProperty.all(defaultFormLabelTextStyle))),
//bottomNavigationBarTheme: BottomNavigationBarThemeData(type: BottomNavigationBarType.fixed, backgroundColor: opaque.current().backgroundHilightElementColor), // Can't determine current use
textButtonTheme: TextButtonThemeData(
@ -246,8 +245,8 @@ ThemeData mkThemeData(Settings opaque) {
labelColor: opaque.current().mainTextColor,
unselectedLabelColor: opaque.current().mainTextColor,
indicator: UnderlineTabIndicator(borderSide: BorderSide(color: opaque.current().defaultButtonActiveColor)),
labelStyle: opaque.scaleFonts(defaultTextButtonStyle).copyWith(color: opaque.current().mainTextColor),
unselectedLabelStyle: opaque.scaleFonts(defaultTextStyle).copyWith(color: opaque.current().mainTextColor),
labelStyle: opaque.scaleFonts(defaultTextButtonStyle),
unselectedLabelStyle: opaque.scaleFonts(defaultTextStyle),
tabAlignment: TabAlignment.center),
dialogTheme: DialogTheme(
backgroundColor: opaque.current().backgroundPaneColor,

View File

@ -56,7 +56,8 @@ class _SplashViewState extends State<SplashView> {
: appState.modalState == ModalState.storageMigration
? AppLocalizations.of(context)!.storageMigrationModalMessage
: AppLocalizations.of(context)!.shuttingDownApp, // Todo l10n AppLocalizations.of(context)!.storageMigrationModalMessage
style: defaultTextButtonStyle.copyWith(fontSize: 16.0, fontFamily: "Inter", color: appState.appError == "" ? whiteishPurple : hotPink))),
style: defaultTextButtonStyle.copyWith(
fontSize: 16.0, fontFamily: "Inter", color: appState.appError == "" ? whiteishPurple : hotPink))),
Visibility(
visible: appState.modalState == ModalState.storageMigration || appState.modalState == ModalState.shutdown,
child: LinearProgressIndicator(

View File

@ -63,7 +63,7 @@ class _ContactRowState extends State<ContactRow> {
enableFeedback: true,
splashFactory: InkSplash.splashFactory,
child: Ink(
color: selected ? (Provider.of<Settings>(context).theme.backgroundHilightElementColor as Color).withOpacity(0.8) : Colors.transparent,
color: selected ? Provider.of<Settings>(context).theme.backgroundHilightElementColor : Colors.transparent,
child: Container(
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, children: [
Padding(
@ -123,8 +123,8 @@ class _ContactRowState extends State<ContactRow> {
height: contact.isInvitation ? Provider.of<Settings>(context).fontScaling * 14.0 + 35.0 : Provider.of<Settings>(context).fontScaling * 14.0 + 5.0,
child: contact.isInvitation == true
? FittedBox(
fit: BoxFit.scaleDown,
child: Wrap(children: <Widget>[
fit: BoxFit.cover,
child: Row(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: <Widget>[
Padding(
padding: EdgeInsets.all(2),
child: TextButton.icon(

View File

@ -40,19 +40,12 @@ endif()
# default. In most cases, you should add new options to specific targets instead
# of modifying this function.
function(APPLY_STANDARD_SETTINGS TARGET)
# Not ideal, there doesn't appear to be a way to get target arch so getting host arch. won't work for cross compiling
execute_process(COMMAND uname -m OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE ARCH)
target_compile_features(${TARGET} PUBLIC cxx_std_14)
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
# -Os -fno-ident (optimize for size, and strip idents, don't generate a build-id, fix hash style)
target_compile_options(${TARGET} PRIVATE -Wall -Werror -Os -fno-ident)
# on x86_64 use an included elf_x86_64.x for reproducibility. for other arches don't (and then don't be reproducible)
if(${ARCH} STREQUAL "x86_64")
target_link_libraries(${TARGET} PRIVATE -Qn -Os -Wl,-s,--hash-style=gnu,--build-id=none,--script=${PROJECT_BUILD_DIR}/../elf_x86_64.x)
else()
target_link_libraries(${TARGET} PRIVATE -Qn -Os -Wl,-s,--hash-style=gnu,--build-id=none)
endif()
target_link_libraries(${TARGET} PRIVATE -Qn -Os -Wl,-s,--hash-style=gnu,--build-id=none,--script=${PROJECT_BUILD_DIR}/../elf_x86_64.x)
endfunction()
# Flutter library and tool build rules.

View File

@ -10,7 +10,6 @@
#include <pwd.h>
#include <flutter_linux/flutter_linux.h>
#include <flutter_linux/fl_dart_project.h>
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h>
#endif
@ -88,6 +87,7 @@ static void my_application_activate(GApplication* application) {
if( stat("lib/cwtch", &info) == 0) {
// use local dir structure
fl_dart_project_set_assets_path(project, g_build_filename("data", "flutter_assets", nullptr));
//project->aot_library_path = g_build_filename("lib", "libapp.so", nullptr);
fl_dart_project_set_aot_library_path(project, g_build_filename("lib", "libapp.so", nullptr));
fl_dart_project_set_icu_data_path(project, g_build_filename("data", "icudtl.dat", nullptr));
gtk_window_set_icon_from_file(window, "./cwtch.png", NULL);
@ -98,6 +98,7 @@ static void my_application_activate(GApplication* application) {
// /home/$USER/.local/share/cwtch/data/flutter_assets
fl_dart_project_set_assets_path(project, g_build_filename(homedir, ".local", "share", "cwtch", "data", "flutter_assets", nullptr));
// /home/$USER/.local/lib/cwtch/
//project->aot_library_path = g_build_filename(homedir, ".local", "lib", "cwtch", "libapp.so", nullptr);
fl_dart_project_set_aot_library_path(project, g_build_filename(homedir, ".local", "lib", "cwtch", "libapp.so", nullptr));
// /home/$USER/.local/share/cwtch/data
fl_dart_project_set_icu_data_path(project, g_build_filename(homedir, ".local", "share", "cwtch", "data", "icudtl.dat", nullptr));
@ -107,6 +108,7 @@ static void my_application_activate(GApplication* application) {
// /usr/share/cwtch/data/flutter_assets
fl_dart_project_set_assets_path(project, g_build_filename("/", "usr", "share", "cwtch", "data", "flutter_assets", nullptr));
// /usr/lib/cwtch
//project->aot_library_path = g_build_filename("/", "usr", "lib", "cwtch", "libapp.so", nullptr);
fl_dart_project_set_aot_library_path(project, g_build_filename("/", "usr", "lib", "cwtch", "libapp.so", nullptr));
// /usr/share/cwtch/data
fl_dart_project_set_icu_data_path(project, g_build_filename("/", "usr", "share", "cwtch", "data", "icudtl.dat", nullptr));