mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 03:43:52 +00:00
Various flatpak fixes and improvements (#9527)
* Revert98be94a729We carry a wxgtk patch [1] that detects dark theme automatically. If it doesn't work, it means that either selected Gtk theme is not installed in flatpak environment, or appropriate xdg-desktop-portal for the DE is not installed. Plasma users may need to install org.gtk.Gtk3theme.Adapta Also see https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Settings.html [1] 0001-Enable-using-a-dark-theme-when-Gnome-dark-style-is-s.patch * flatpak: introduce ORCA_SLICER_DARK_THEME to force dark theme If ORCA_SLICER_DARK_THEME is set, dark theme will be applied regardless of system settings. * FIX: occt build failure Pick up build error fix from upstream:7236e83dcc/run/build/BambuStudio/deps/build/dep_OCCT-prefix/src/dep_OCCT/src/StdPrs/StdPrs_BRepFont.cxx: In member function ‘Standard_Boolean StdPrs_BRepFont::renderGlyph(Standard_Utf32Char, TopoDS_Shape&)’: /run/build/BambuStudio/deps/build/dep_OCCT-prefix/src/dep_OCCT/src/StdPrs/StdPrs_BRepFont.cxx:465:30: error: invalid conversion from ‘unsigned char*’ to ‘const char*’ [-fpermissive] 465 | const char* aTags = &anOutline->tags[aStartIndex]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | unsigned char* * Set policy CMP0167 to NEW Newer cmake switched to using BoostConfig.cmake shipped with boost-1.70 or later for detecting boost, to preserve old behavior policy CMP0167 was introduced. Set it to "NEW" to indicate that we want to use .cmake shipped with boost * Add OpenSSL tarball link to the manifest * Add curl zip to the manifest * flatpak: bump runtime version to 47 Gnome 47 has been released a while ago --------- Co-authored-by: Bastien Nocera <hadess@hadess.net>
This commit is contained in:
committed by
GitHub
parent
6da7fe62a2
commit
b72e28c116
@@ -1,4 +1,4 @@
|
||||
From 221be0af1a0b5bcf05c59b3403f969643b42dbaf Mon Sep 17 00:00:00 2001
|
||||
From f0135d9c3faf0207f7100991ccf512f228b90570 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Cornett <paulcor@users.noreply.github.com>
|
||||
Date: Sat, 30 Sep 2023 16:42:58 -0700
|
||||
Subject: [PATCH] Enable using a dark theme when Gnome "dark style" is set
|
||||
@@ -8,11 +8,11 @@ automatically, so request it explicitly.
|
||||
|
||||
Co-authored-by: Colin Kinloch
|
||||
---
|
||||
src/gtk/settings.cpp | 112 ++++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 111 insertions(+), 1 deletion(-)
|
||||
src/gtk/settings.cpp | 118 ++++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 117 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/gtk/settings.cpp b/src/gtk/settings.cpp
|
||||
index 304724773711..74898d9bb953 100644
|
||||
index 3047247737..f13ea2ef24 100644
|
||||
--- a/src/gtk/settings.cpp
|
||||
+++ b/src/gtk/settings.cpp
|
||||
@@ -183,6 +183,64 @@ static void notify_gtk_font_name(GObject*, GParamSpec*, void*)
|
||||
@@ -80,7 +80,7 @@ index 304724773711..74898d9bb953 100644
|
||||
// Some notes on using GtkStyleContext. Style information from a context
|
||||
// attached to a non-visible GtkWidget is not accurate. The context has an
|
||||
// internal visibility state, controlled by the widget, which it presumably
|
||||
@@ -1124,12 +1182,62 @@ bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
|
||||
@@ -1124,12 +1182,68 @@ bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
|
||||
class wxSystemSettingsModule: public wxModule
|
||||
{
|
||||
public:
|
||||
@@ -109,8 +109,14 @@ index 304724773711..74898d9bb953 100644
|
||||
+
|
||||
+ m_proxy = nullptr;
|
||||
+
|
||||
+ if (getenv("ORCA_SLICER_DARK_THEME") != nullptr) {
|
||||
+ /* 1 for prefer dark */
|
||||
+ GVariant *value = g_variant_new_uint32(1);
|
||||
+ UpdatePreferDark(value);
|
||||
+ g_variant_unref(value);
|
||||
+ }
|
||||
+ // GTK_THEME environment variable overrides other settings
|
||||
+ if (getenv("GTK_THEME") == nullptr)
|
||||
+ else if (getenv("GTK_THEME") == nullptr)
|
||||
+ {
|
||||
+ m_proxy = g_dbus_proxy_new_for_bus_sync(
|
||||
+ G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_NONE, nullptr,
|
||||
@@ -144,7 +150,7 @@ index 304724773711..74898d9bb953 100644
|
||||
void wxSystemSettingsModule::OnExit()
|
||||
{
|
||||
#ifdef __WXGTK3__
|
||||
@@ -1141,6 +1249,8 @@ void wxSystemSettingsModule::OnExit()
|
||||
@@ -1141,6 +1255,8 @@ void wxSystemSettingsModule::OnExit()
|
||||
g_signal_handlers_disconnect_by_func(settings,
|
||||
(void*)notify_gtk_font_name, NULL);
|
||||
}
|
||||
@@ -154,5 +160,5 @@ index 304724773711..74898d9bb953 100644
|
||||
if (gs_tlw_parent)
|
||||
{
|
||||
--
|
||||
2.46.2
|
||||
2.49.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user