- Renamed themes:
- "colorful" to "default" and "colorful_dark" to "default_dark"
- "default" to "monochrome" and "default_dark" to "monochrome_dark"
- "colorful_midnight_blue" to "qdarkstyle_midnight_blue"
- "qdarkstyle_midnight_blue" to "qdarkstyle_midnight_blue_monochrome"
- qdarkstyle is renamed from "Dark" to "Mine Shaft" in the UI
- default and monochrome themes all use the same qss stylesheet
- Remove the ability to select "default_dark" directly
- Add "qdarkstyle_monochrome" theme
- Remove duplicated icon files
- Windows dark theme uses "fusion" style, which is better suited, but has minor differences
- Improve OS theme detection
- Linux:
- Listen for OS color schemes changes on D-Bus
- Read OS scheme for D-Bus. Fallback with gsettings, reading org.gnome.desktop.interface.
First "color-scheme" key, then "gtk-theme". Finally, fallback to checking window palette
- Windows (dark mode detection was not implemented before):
- Force dark palette when OS uses dark mode by setting QT_QPA_PLATFORM to "windows:darkmode=2"
- This enables to detect dark mode by checking the window palette
- Improve theming capabilites:
- Linux uses custom palette when dark mode is detected.
By using palette(xxx) in .qss files, there is no need to create a dark stylesheet
- Allow themes to have stylesheet variants, dark.qss and light.qss
- If current mode is dark, use dark icons for controller and keyboard applets
- Add "dark" property to RendererStatusBarButton and GPUStatusBarButton, set to true when dark mode is used.
Allows to have distinct colors for GPU API and accuracy buttons depending on dark mode or not
- Enable all themes to have dark icon alternatives, not just "default" and "colorful"
- If dark mode, icons are loaded from the directory "THEME-NAME_dark/icons"
- If current mode is dark, use dark icons for controller and keyboard applets
- Only qdarkstyle, qdarkstyle_midnight_blue, colorful_dark and
colorful_midnight_blue used elements specific to dark themes
The language names we are using in the android resources differ from those on Transifex.
We need to manually specify mappings for them, so Transifex is able to place the files in the correct folders.
Currently we're using the python client which uses an API that they
state will sunset Nov 30, 2022.
`tx push -s` actually appears to work properly, some of the other
commands require tweaking, like instead of suggesting `tx pull -a` in
dist/languages we need to suggest `tx pull -t -a`
colorful theme has been default theme for awhile. having colorful theme
try and grab icons from other theme doesn't work on Linux.
Also adding two additional icons, info is to hint to the user that they
should hit verify after pasting in a token, sync is to show that the
verification is occurring.
I've seen some comments stating that sharing pre-compiled packages
of yuzu is problematic for linux distributions due to some contents
having license of CC BY-ND 3.0
Better licensed sources of icons have been found for most cases,
see the changes to the .reuse/dep5 file for details.
Placeholders for connected/disconnected icons
At the time of writing I consider these icons to be placeholders,
hence three copies. colorful is grey, default is black, qdarkstyle is white
connected is gnome/16x16/network-idle.png with no changes
connected_notification is gnome/16x16/network-error.png with changes
disconnected is gnome/16x16/network-offline.png with changes
Looking at licenses: GNOME icon theme is distributed under the terms of either
GNU LGPL v.3 or Creative Commons BY-SA 3.0 license.
Debian appears to explicitly state they're licensing under
Creative Commons Attribution-Share Alike 3.0
From a tarball at the following link suggests we can just attribute GNOME Project
https://download.gnome.org/sources/gnome-icon-theme/
When attributing the artwork, using "GNOME Project" is enough.
Please link to http://www.gnome.org where available.
CC-BY-SA-3.0.txt from https://creativecommons.org/licenses/by-sa/3.0/legalcode.txt
yuzu's default theme doesn't specify everything, which is fine for
windows, but in linux anything unspecified is set to the users theme.
Symptoms of this are that a linux user with a dark theme won't think
to change the theme to a dark theme when first using yuzu
Idea here is to try and support arbitrary themes on linux.
preliminary work on a "default_dark" theme, used only as overlay
for any themes that are measured to be dark mode.
Other work done:
FreeDesktop standard icon names:
plus -> list-add
delete refresh, we use view-refresh
remove duplicated icons for qdarkstyle_midnight_blue
referencing icon aliases in the qrc files is the way to go
Note:
Dynamic style changing doesn't appear to work with AppImage
Turns out that for Qt to properly handle plurals in English a
translation needs to be provided, otherwise the user is left with
messages such as "Building: 2 shader(s)"
Plurals for other all other languages are handled on transifex.
I wrote the README.md to just refer to it as a translation
collaboration site just in case we ever switch.
These translations being out of date won't pose any technical problems
so I believe it is fine to handle them manually on a "best effort"
basis.
The files are generated into the source directory so that the
relative filenames are correct. The generated file is added to
.gitignore
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.
Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.
The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.
Following REUSE has a few advantages over the current approach:
- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
`.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
files like binary assets / images is always accurate and up to date
To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.
[REUSE]: https://reuse.software
Follow-up to 01cf05bc75
For people not used to the Yuzu UI it's not always clear if the emulated
console is docked or not. The other items update their text when clicked,
this PR brings the DOCK button in line with this.
DOCK -> DOCKED or HANDHELD