Compare commits

...

7 Commits

Author SHA1 Message Date
Dan Ballard 899da5fea1 linux cmake fix for arm64 compiling
continuous-integration/drone/pr Build is pending Details
continuous-integration/drone/push Build is pending Details
2024-04-21 19:34:12 -07:00
Sarah Jamie Lewis 7741b255da
Format
continuous-integration/drone/pr Build is pending Details
continuous-integration/drone/push Build is pending Details
2024-04-16 10:58:30 -07:00
Sarah Jamie Lewis 3aa0042b71
Fix scaling on Contact Row Accept/Reject / Fix Color Blending 2024-04-16 10:58:22 -07:00
Sarah Jamie Lewis 4cb59d6cbc Merge pull request 'theme loading must take place after cwtch.Start so `dev/` has time to be appended to path' (#880) from themeFixes2 into trunk
continuous-integration/drone/push Build is pending Details
Reviewed-on: #880
Reviewed-by: Sarah Jamie Lewis <sarah@openprivacy.ca>
2024-04-16 17:57:29 +00:00
Dan Ballard f8ec6099bc theme loading must take place after cwtch.Start so `dev/` has time to be appended to path
continuous-integration/drone/pr Build is pending Details
2024-04-16 17:57:21 +00:00
Sarah Jamie Lewis 6e010b27b7
Fix Light Theme List Tile Colors
continuous-integration/drone/pr Build is pending Details
continuous-integration/drone/push Build is passing Details
2024-04-15 11:39:23 -07:00
Dan Ballard 9f982ae167 finally remove dirty struct copy in linux my_application.cc and nsis path fix for flutter 3.19.3
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2024-04-05 15:46:33 -07:00
8 changed files with 24 additions and 30 deletions

View File

@ -58,9 +58,6 @@ 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,9 +106,10 @@ 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();
cwtch.getCwtchDir().then((dir) {
globalSettings.themeloader.LoadThemes(dir);
cwtch.Start().then((v) {
cwtch.getCwtchDir().then((dir) {
globalSettings.themeloader.LoadThemes(dir);
});
});
});
print("initState: starting connectivityListener");

View File

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

View File

@ -56,8 +56,7 @@ 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 : Colors.transparent,
color: selected ? (Provider.of<Settings>(context).theme.backgroundHilightElementColor as Color).withOpacity(0.8) : 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.cover,
child: Row(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: <Widget>[
fit: BoxFit.scaleDown,
child: Wrap(children: <Widget>[
Padding(
padding: EdgeInsets.all(2),
child: TextButton.icon(

View File

@ -40,12 +40,19 @@ 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)
target_link_libraries(${TARGET} PRIVATE -Qn -Os -Wl,-s,--hash-style=gnu,--build-id=none,--script=${PROJECT_BUILD_DIR}/../elf_x86_64.x)
# 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()
endfunction()
# Flutter library and tool build rules.

View File

@ -24,17 +24,6 @@ struct _MyApplication {
FlMethodChannel* channel;
// Redefining from flutter/engine::shell/platform/linux/fl_dart_project.cc
// struct def required here to enable compiler to allow access to variables
struct _FlDartProject {
GObject parent_instance;
gchar* aot_library_path;
gchar* assets_path;
gchar* icu_data_path;
gchar** dart_entrypoint_args;
};
G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
#include <dlfcn.h>
@ -99,7 +88,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);
} else if( stat("/usr/share/cwtch/data/flutter_assets", &info ) != 0 ) {
@ -109,7 +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));
gtk_window_set_icon_from_file(window, g_build_filename(homedir, ".local", "share", "icons", "cwtch.png", nullptr), NULL);
@ -118,7 +107,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));
gtk_window_set_icon_from_file(window, "/usr/share/icons/cwtch.png", NULL);

View File

@ -87,7 +87,7 @@ Section
# define what to install and place it in the output path
# Filler for .sh to populate with contents of deploy/windows
#FILESLISTSTART
FILE /r "..\..\build\windows\runner\Release\"
FILE /r "..\..\build\windows\x64\runner\Release\"
#FILESLISTEND
CreateDirectory "$SMPROGRAMS\Cwtch"