Add transparency option#540
Conversation
|
Opinions on these translation keys? The linux/windows one would be used depending on which platform you're on. |
|
Should be all set, needs testing on windows and macos and then a review. |
|
Confirmed working on windows after minor issues, just need test on macos. |
Require discord restart for transparency change Move transparency button move readSettingsSync to src/util.mts At platform specific notices Fix transparency on Windows BrowserWindow rework MacOS Auto-Maximize
|
Example video of it working: https://zipline.eastarcti.ca/u/KgFiYH.mp4 :root {
--window-background-material: "acrylic";
--window-background-color: #00000000;
}
html, body {
background: transparent;
}Example theme using acrylic https://github.com/EastArctica/replugged-nord-transparent/releases/tag/v1.0.3 |
|
maybe we can do something listening the resize event from the BrowserWindow object something like this: window.on('resize', () => {
window.webContents.send('resize-event');
});we also have the maximize unmaximize and minimize events |
|
@Ren0X1 This probably isn't what you meant but while looking into it the latest commit changes the way maximize/unmaximize is done in a few ways but seems to prevent the window from visually being at pixel 1,1 (sometimes) while still fixing the grey background as well as making the maximize experience a little bit cleaner. If anyone knows/can figure out how to unmaximize when dragged while in the maximized state cleanly please let me know! |
…o transparency-button
…o pr/EastArctica/540
…o pr/EastArctica/540
fedeericodl
left a comment
There was a problem hiding this comment.
LGTM. Tested on Windows and Linux.
This PR adds a transparency button into settings. This has been confirmed tested on Manjaro linux as well as I believe tested on Windows although that should be double checked.
Things of note:
Insrc/main/index.ts, we manually get the replugged settings. This is needed in order for the launcher to know whether to launch supporting transparency or not. This should be moved elsewhere or done differently however I would like some input on it.Currently there is not translation key forREPLUGGED_SETTINGS_TRANSPARENTorREPLUGGED_SETTINGS_TRANSPARENT_DESC. After speaking with @asportnoy, we determined that the various issues with having transparency should be noted per platform instead of all together as they were pre-swc.The settings is currently under advanced settings, however I suppose there is no reason for this to be and it should be moved out and into the general settings.If anyone encounters any bugs with this please let me know!