{"id":26498759,"url":"https://github.com/jo-tools/app-appearance","last_synced_at":"2025-03-20T14:39:57.425Z","repository":{"id":42707762,"uuid":"455704839","full_name":"jo-tools/app-appearance","owner":"jo-tools","description":"Xojo example project: App Appearance","archived":false,"fork":false,"pushed_at":"2025-03-08T21:51:26.000Z","size":4088,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T22:25:30.272Z","etag":null,"topics":["darkmode","declares","macos","windows","xojo"],"latest_commit_sha":null,"homepage":"https://www.jo-tools.ch","language":"Xojo","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jo-tools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://paypal.me/jotools"]}},"created_at":"2022-02-04T21:41:20.000Z","updated_at":"2025-03-04T13:26:46.000Z","dependencies_parsed_at":"2025-03-08T22:22:19.917Z","dependency_job_id":"d7103b3f-7b0e-4a4d-b714-a4d01df99f9b","html_url":"https://github.com/jo-tools/app-appearance","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo-tools%2Fapp-appearance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo-tools%2Fapp-appearance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo-tools%2Fapp-appearance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo-tools%2Fapp-appearance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jo-tools","download_url":"https://codeload.github.com/jo-tools/app-appearance/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244631866,"owners_count":20484645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["darkmode","declares","macos","windows","xojo"],"created_at":"2025-03-20T14:39:56.685Z","updated_at":"2025-03-20T14:39:57.420Z","avatar_url":"https://github.com/jo-tools.png","language":"Xojo","funding_links":["https://paypal.me/jotools"],"categories":[],"sub_categories":[],"readme":"# App Appearance\nXojo example project\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n\n## Description\nAn example Xojo project to show how to deal with Xojo's DarkMode Support to customize the application's appearance on macOS and Windows.\n\n### macOS\nmacOS 10.14 has introduced DarkMode. Xojo just provides a Build Setting ```Supports DarkMode```. The built application will then appear in Dark- or Lightmode, according to the current system setting.  \nThis example project shows how to override this, so that your application can provide a user preference allowing the application to appear in ```Always Dark```, ```Always Light``` - or of course the ```System Default```.\n\n### Windows\nDarkMode on Windows is... not that good - at least not for Win32 Apps/Controls, which is what Xojo is currently using. For that reason it is best practice to explizitly allow the user to ```Opt-in``` for DarkMode support of your application. Many Windows users love to have their system setting to have dark appearance in apps, but might dislike that in Win32-apps.  \nStarting with Xojo 2021r3, Xojo supports DarkMode for ```TargetWindows```. This example project shows how to allow the users to ```Opt-in``` for DarkMode support, because Xojo by default always uses the system settings.  \n*Note: Unlike macOS, you can never have the application show in DarkMode on Windows if 'app appearance setting' is 'Light Mode'.*\n\n### ScreenShots\nmacOS in DarkMode, but application in ```Always Light```  \n![ScreenShot: macOS - Always Light](screenshots/app-appearance_always-light.png?raw=true)\n\nmacOS in LightMode, but application in ```Always Dark```  \n![ScreenShot: macOS - Always Dark](screenshots/app-appearance_always-dark.png?raw=true)\n\nWindows in DarkMode and user's app-preference: ```DarkMode Opt-in: no```, so application will appear in ```Light```   \n![ScreenShot: macOS - Always Light](screenshots/app-appearance_optin-no.png?raw=true)\n\nWindows in DarkMode and user's app-preference: ```DarkMode Opt-in: yes```, so application will appear in ```Dark```   \n![ScreenShot: macOS - Always Light](screenshots/app-appearance_optin-yes.png?raw=true)\n\n\n## Xojo\n### Requirements\n[Xojo](https://www.xojo.com/) is a rapid application development for Desktop, Web, Mobile \u0026 Raspberry Pi.  \n\nThe Desktop application Xojo example project ```AppAppearance.xojo_project``` is using:\n- Xojo 2024r4.2\n- API 2\n\n*Note: You'll need to build with Xojo 2021r3 or later to get DarkMode Support on TargetWindows*\n\n### How to use in your own Xojo project?\n1. Copy the Module ```modAppAppearance``` from the example project, and paste it into your project.\n2. Study the example project to learn how to use the provided methods in the Module.\n   - Windows: The Opt-In happens in ```App.Open```: ```Windows_DarkMode_OptIn = true|false```\n   - macOS: You can switch the appearance any time. See actions in the corresponding ```PushButtons```, e.g.: ```macOSAppAppearance = NSAppearanceType.Light|Dark|Default```\n\n## About\nJuerg Otter is a long term user of Xojo and working for [CM Informatik AG](https://cmiag.ch/). Their Application [CMI LehrerOffice](https://cmi-bildung.ch/) is a Xojo Design Award Winner 2018. In his leisure time Juerg provides some [bits and pieces for Xojo Developers](https://www.jo-tools.ch/).\n\n### Contact\n[![E-Mail](https://img.shields.io/static/v1?style=social\u0026label=E-Mail\u0026message=xojo@jo-tools.ch)](mailto:xojo@jo-tools.ch)\n\u0026emsp;\u0026emsp;\n[![Follow on Facebook](https://img.shields.io/static/v1?style=social\u0026logo=facebook\u0026label=Facebook\u0026message=juerg.otter)](https://www.facebook.com/juerg.otter)\n\u0026emsp;\u0026emsp;\n[![Follow on Twitter](https://img.shields.io/twitter/follow/juergotter?style=social)](https://twitter.com/juergotter)\n\n### Donation\nDo you like this project? Does it help you? Has it saved you time and money?  \nYou're welcome - it's free... If you want to say thanks I'd appreciate a [message](mailto:xojo@jo-tools.ch) or a small [donation via PayPal](https://paypal.me/jotools).  \n\n[![PayPal Dontation to jotools](https://img.shields.io/static/v1?style=social\u0026logo=paypal\u0026label=PayPal\u0026message=jotools)](https://paypal.me/jotools)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjo-tools%2Fapp-appearance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjo-tools%2Fapp-appearance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjo-tools%2Fapp-appearance/lists"}