OSX iOS support appearance colours (PR #25853)

24 views
Skip to first unread message

Stefan Csomor

unread,
Oct 2, 2025, 3:16:41 PM (4 days ago) Oct 2
to wx-...@googlegroups.com, Subscribed

You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/25853

Commit Summary

  • a46d232 add type for uicolor into wx space, add a new WXColor type resolving to either NSColor or UIColor
  • a80003c new file src/iphone/colour.mm added
  • 0c53749 fixing regex warning by switching to raw strings
  • 7b1e1aa bringing cocoa and ios implementations closer, adding appearance to ios colours

File Changes

(12 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25853@github.com>

VZ

unread,
Oct 2, 2025, 3:27:20 PM (4 days ago) Oct 2
to wx-...@googlegroups.com, Subscribed

@vadz commented on this pull request.

I am not sure why all trailing whitespace got removed from Makefile.in, but we probably don't want to do this, as it will be added back during next regeneration.


In src/osx/iphone/colour.mm:

> +// Author:      Vadim Zeitlin
+// Created:     2015-11-26 (completely replacing the old version of the file)
+// Copyright:   (c) 2015 Vadim Zeitlin

My name shouldn't be here.


In src/osx/iphone/settings.mm:

> +    {
+        return defaultValue;
+    }
+
+    return [setting intValue];
+}
+
+// ----------------------------------------------------------------------------
+// wxSystemAppearance
+// ----------------------------------------------------------------------------
+
+wxString wxSystemAppearance::GetName() const
+{
+    UITraitCollection* traitCollection = [UIScreen mainScreen].traitCollection;
+    if (traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark)
+        return wxT("Dark");

We shouldn't use wxT() in new code, it should be either wxS() or nothing at all.

⬇️ Suggested change
-        return wxT("Dark");
+        return wxS("Dark");

In src/osx/iphone/settings.mm:

> +    }
+
+    return [setting intValue];
+}
+
+// ----------------------------------------------------------------------------
+// wxSystemAppearance
+// ----------------------------------------------------------------------------
+
+wxString wxSystemAppearance::GetName() const
+{
+    UITraitCollection* traitCollection = [UIScreen mainScreen].traitCollection;
+    if (traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark)
+        return wxT("Dark");
+    else if (traitCollection.userInterfaceStyle == UIUserInterfaceStyleLight)
+        return wxT("Light");
⬇️ Suggested change
-        return wxT("Light");
+        return wxS("Light");

In src/osx/iphone/settings.mm:

> +    return [setting intValue];
+}
+
+// ----------------------------------------------------------------------------
+// wxSystemAppearance
+// ----------------------------------------------------------------------------
+
+wxString wxSystemAppearance::GetName() const
+{
+    UITraitCollection* traitCollection = [UIScreen mainScreen].traitCollection;
+    if (traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark)
+        return wxT("Dark");
+    else if (traitCollection.userInterfaceStyle == UIUserInterfaceStyleLight)
+        return wxT("Light");
+    else
+        return wxT("Unspecified");
⬇️ Suggested change
-        return wxT("Unspecified");
+        return wxS("Unspecified");


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25853/review/3296088185@github.com>

Stefan Csomor

unread,
Oct 2, 2025, 3:27:38 PM (4 days ago) Oct 2
to wx-...@googlegroups.com, Push

@csomor pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25853/before/7b1e1aa362744bc9d97825456fdb222d5788c207/after/0db2960976e2601e2319b982270b7b49d783fd04@github.com>

Stefan Csomor

unread,
Oct 2, 2025, 3:30:24 PM (4 days ago) Oct 2
to wx-...@googlegroups.com, Push

@csomor pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25853/before/0db2960976e2601e2319b982270b7b49d783fd04/after/9ca74d2f19b5bf344000c7b580643ed0718a09dd@github.com>

Stefan Csomor

unread,
Oct 2, 2025, 3:30:31 PM (4 days ago) Oct 2
to wx-...@googlegroups.com, Push

@csomor pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25853/before/9ca74d2f19b5bf344000c7b580643ed0718a09dd/after/0bd23267b5c48853f71b18535c72240d69531f15@github.com>

Stefan Csomor

unread,
Oct 2, 2025, 3:30:38 PM (4 days ago) Oct 2
to wx-...@googlegroups.com, Push

@csomor pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25853/before/0bd23267b5c48853f71b18535c72240d69531f15/after/350cf9596225591c782ee5e195cf5ab1e4d90d4c@github.com>

Stefan Csomor

unread,
Oct 2, 2025, 3:30:45 PM (4 days ago) Oct 2
to wx-...@googlegroups.com, Subscribed

@csomor commented on this pull request.


In src/osx/iphone/colour.mm:

> +// Author:      Vadim Zeitlin
+// Created:     2015-11-26 (completely replacing the old version of the file)
+// Copyright:   (c) 2015 Vadim Zeitlin

sorry, copied the headers over from the cocoa version ...


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25853/review/3296116111@github.com>

Stefan Csomor

unread,
Oct 2, 2025, 3:32:34 PM (4 days ago) Oct 2
to wx-...@googlegroups.com, Subscribed
csomor left a comment (wxWidgets/wxWidgets#25853)

I am not sure why all trailing whitespace got removed from Makefile.in, but we probably don't want to do this, as it will be added back during next regeneration.

oh, sorry, my BBEdit seems to have messed this up


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25853/c3362658115@github.com>

Stefan Csomor

unread,
Oct 2, 2025, 3:41:27 PM (4 days ago) Oct 2
to wx-...@googlegroups.com, Push

@csomor pushed 2 commits.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25853/before/350cf9596225591c782ee5e195cf5ab1e4d90d4c/after/769c1518d2e4856393b2486e50534ace474597cc@github.com>

Stefan Csomor

unread,
Oct 2, 2025, 3:48:58 PM (4 days ago) Oct 2
to wx-...@googlegroups.com, Push

@csomor pushed 1 commit.

  • 54286b0 switching usage from OSXGetNSColor to generic OSXGetWXColor


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25853/before/769c1518d2e4856393b2486e50534ace474597cc/after/54286b0b832bdc7b8d44d69861f189396cce7a10@github.com>

Stefan Csomor

unread,
Oct 2, 2025, 3:58:50 PM (4 days ago) Oct 2
to wx-...@googlegroups.com, Push

@csomor pushed 1 commit.

  • 83cbbfd missed replacement in header


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25853/before/54286b0b832bdc7b8d44d69861f189396cce7a10/after/83cbbfd36ca92011b382dccd3962e0725c9d47a6@github.com>

Stefan Csomor

unread,
Oct 2, 2025, 5:01:45 PM (4 days ago) Oct 2
to wx-...@googlegroups.com, Push

@csomor pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25853/before/83cbbfd36ca92011b382dccd3962e0725c9d47a6/after/7c0385e5d9cd4ef160c99f076b45937cee093215@github.com>

Stefan Csomor

unread,
Oct 2, 2025, 5:18:51 PM (4 days ago) Oct 2
to wx-...@googlegroups.com, Push

@csomor pushed 1 commit.

  • 15e9f71 another attempt at getting unchanged component values


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25853/before/7c0385e5d9cd4ef160c99f076b45937cee093215/after/15e9f713099d59c387f1d4ab2c20473d0b5f6218@github.com>

Stefan Csomor

unread,
Oct 3, 2025, 5:04:58 AM (3 days ago) Oct 3
to wx-...@googlegroups.com, Push

@csomor pushed 1 commit.

  • 3eedc0a use CGColor for component wise color creation,


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25853/before/15e9f713099d59c387f1d4ab2c20473d0b5f6218/after/3eedc0aedaa84bdc6ad72fd4fa583d84ca42e80b@github.com>

Stefan Csomor

unread,
Oct 5, 2025, 8:56:04 AM (21 hours ago) Oct 5
to wx-...@googlegroups.com, Subscribed

Merged #25853 into master.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25853/issue_event/20101461383@github.com>

Reply all
Reply to author
Forward
0 new messages