fixes regression, allow tlw backgrounds changing according to desktop background, see #26301
https://github.com/wxWidgets/wxWidgets/pull/26309
(2 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@csomor pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Stefan, should I merge this one or do you think it needs more testing (unlikely to happen as long as it's not merged, IME...)?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Stefan, should I merge this one or do you think it needs more testing (unlikely to happen as long as it's not merged, IME...)?
Hi Vadim, no sorry, #26301 already mentions some things that don't look right
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
OK, I'll mark it as being WIP too then — please remove the label when it's ready to merge (or close it if it finally doesn't work). TIA!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@csomor For wxTextCtrl (and wxSpinCtrl, wxSearchCtrl), you're just missing an override attributes getter, since wxTextCtrl has its own override which uses wxControlBase::GetCompositeControlsDefaultAttributes().
The following patch fixes the appearance for me:
diff --git a/src/common/ctrlcmn.cpp b/src/common/ctrlcmn.cpp
index 672139f3e8..3865ed8c3c 100644
--- a/src/common/ctrlcmn.cpp
+++ b/src/common/ctrlcmn.cpp
@@ -236,7 +236,11 @@ wxControlBase::GetCompositeControlsDefaultAttributes(wxWindowVariant WXUNUSED(va
wxVisualAttributes attrs;
attrs.font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
attrs.colFg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+# ifdef __WXOSX__
+ attrs.colBg = wxTransparentColour;
+# elif
attrs.colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
+# endif
return attrs;
}
For some reason I don't understand, adding an override in the OSX wxTextCtrl in the same vein as what you've done in this PR branch for wxWindowMac/wxWindow doesn't seem to apply to the wxSearchCtrl... maybe I'm missing something though.
In any case, the wxSpinCtrl uses a generic implementation on wxOSX, (as does wxOwnerDrawnComboBox and wxBitmapComboBox) and so the appearance needs to be overridden there too, but these all use wxControlBase::GetCompositeControlsDefaultAttributes(), so it seems simpler to just set the transparent background there.
Beyond those, the only other abnormality I see is with wxDatePickerCtrl, wxTimePickerCtrl (those two I figure is a similar case), and wxListCtrl and friends, which I'll look into next.
Of course, there's the other generic controls I mentioned which have a opaque background on 3.3.0 also, which I want to look into as well...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
As something of an aside, the controlBackgroundColor used for wxSYS_COLOUR_WINDOW and wxSYS_COLOUR_LISTBOX is noted in the documentation:
Do not use this color for drawing. Instead, use an NSVisualEffectView with the appropriate background material.
So it seems like maybe this is the wrong color to return in wxSystemSettingsNative::GetColour()?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()