It is currently March 28th, 2024, 5:52 pm

Rounded Screen Corners

General topics related to Rainmeter.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rounded Screen Corners

Post by balala »

SubjunctiveQuaver wrote: April 18th, 2022, 1:56 pm However, with the "at topmost" setting, windows appear *on top* of the taskbar when dragging, instead of behind as they should be. I can't figure out how to fix it
When setting it to "Stay topmost", you can't get it going behind the taskbar (or can, but only for a second, then it comes back in front). No other solution than setting it to "Topmost" or below (the default "Normal" proves to be the best choice in most cases).
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Rounded Screen Corners

Post by Yincognito »

balala wrote: April 18th, 2022, 3:01 pm When setting it to "Stay topmost", you can't get it going behind the taskbar (or can, but only for a second, then it comes back in front). No other solution than setting it to "Topmost" or below (the default "Normal" proves to be the best choice in most cases).
He didn't mean the skin to go behind, but the other windows when dragging.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rounded Screen Corners

Post by balala »

Yincognito wrote: April 18th, 2022, 3:17 pm He didn't mean the skin to go behind, but the other windows when dragging.
It seems I misunderstood him?
However general windows have nothing to do with Rainmeter, its settings (or skins settings) don1t affect those windows. And there is no way to let general windows going in front of taskbar (or me at least don't know such a way).
However sorry for my misunderstanding...
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Rounded Screen Corners

Post by Yincognito »

balala wrote: April 18th, 2022, 3:21 pm It seems I misunderstood him?
However general windows have nothing to do with Rainmeter, its settings (or skins settings) don1t affect those windows. And there is no way to let general windows going in front of taskbar (or me at least don't know such a way).
However sorry for my misunderstanding...
Yes, you did, but it's easy to do so, as I read his post and images several times before understanding what he meant. Anyways, while you're correct, he's only asking that the 'normal' behavior of windows when dragging them over the taskbar to be obeyed. They normally go behind the taskbar (which is what he wants), but without giving up the 'Stay Topmost' setting in the skin (which has the unwanted effect of setting general windows to be in front of the taskbar when dragging over it).

And as always, it is possible, though it's tricky (see my next reply) ...
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Rounded Screen Corners

Post by Yincognito »

SubjunctiveQuaver wrote: April 18th, 2022, 1:56 pmHowever, with the "at topmost" setting, windows appear *on top* of the taskbar when dragging, instead of behind as they should be. I can't figure out how to fix it :(
I guess it's either a Windows thing or a bug in Rainmeter, not sure. It happens on Windows 10 as well, by the way. It seems that if the taskbar (or the screen?) is completely covered by a 'Stay Topmost' Rainmeter skin, windows will be in front of the taksbar when dragging them. What you can do to workaround it is to subtract 1 px from the height of the skin, i.e. use (#ScreenAreaHeight#-1) in both shapes from the meter. That way, one line of 1 pixel will not cover the bottom of the takbar, so you can have stay topmost in the skin and windows normally going behind the taskbar. The thing is, this creates an unwanted visual effect since the bottom corners are now higher, so the ideal way of doing it is to have a "transparent" / "excluded" / XOR-ed line or part higher up in the skin, say right above the corners. Unfortunately, my shape combining skills are a bit rusty at the moment, so maybe someone else can try doing that - if it works like having the 'excluded' part at the very bottom, that is.
SubjunctiveQuaver wrote: April 18th, 2022, 1:56 pmAlso, had to set the corner radius to 16px -- I'm assuming it's to do with my DPI being 200%? Would there be a way to detect this automatically?)
Not really, but you can set it based on the #ScreenAreaWidth# and/or #ScreenAreaHeight#, e.g. using (#ScreenAreaWidth#/100) instead of #CornerRadius# in the meter will give you 1920 / 100 = 19 pixels, if your resolution is 1920x1080. I know this is not what you want, but detecting the DPI setting is not something Rainmeter can do in the INI code, bar some plugin or such that may help you with that.

EDIT: Or, you may want to use a Registry measure to investigate HKEY_CURRENT_USER\Control Panel\Desktop\PerMonitorSettings. If you run regedit.exe and go to that path you'll see that there are a couple of oddly named subfolders there, each having a DpiValue key whose value is modifying when you change scaling in Windows, assuming you view the right monitor and hit F5 to Refresh in regedit.exe)
Last edited by Yincognito on April 18th, 2022, 4:40 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rounded Screen Corners

Post by balala »

Yincognito wrote: April 18th, 2022, 3:42 pm but without giving up the 'Stay Topmost' setting in the skin (which has the unwanted effect of setting general windows to be in front of the taskbar when dragging over it).
I doubt. In fact reading your reply I tried this out and it seems not to be correct. I set one skin, then more (three, but not all) to "Stay topmost" and general windows still gone behind the taskbar. To be honest I can1t see how the setting of skins could affect how general windows are behaving.
Or am I missing something again?
istir
Posts: 4
Joined: April 18th, 2022, 4:16 pm

Re: Rounded Screen Corners

Post by istir »

EDIT: For any future searchers, Yincognito's answer works.
TL;DR: instead of making one skin, you make two of them:
[SkinsFolder]\Rounded Corners Top\Rounded Corners Top.ini
and
[SkinsFolder]\Rounded Corners Bottom\Rounded Corners Bottom.ini

I attached both of them. It should position correctly, but if you want to drag them around, remove OnRefreshAction line.

___________________________

OLD POST:

I stumbled upon this thread by pure chance as today I decided to try getting rounded corners in Windows and found some other solution (also using Rainmeter), but after I alt-tabbed my borderless game taskbar didn't show up like normal. Looking at what Yincognito said two posts ago it seems like Windows sees a window that is "fullscreen" and decides to hide taskbar. That definitely makes sense, looking at how Rainmeter widgets are rendered. Making a window that is 1px smaller than monitor resolution works fine, but obviously looks bad (would be "okay" if you cropped your monitor's width/height in it's OSD, but it's such a bodged solution even I wouldn't do that).

Making two widgets (one for top and one for bottom) doesn't fix the issue, as rainmeter renders everything on one "window", that will get stretched to accomodate every widget (so in this case, your whole screen) getting me back to square one.
How I "fixed" it? I thought of how courageous Apple is for making their newest Macbook's screen rounded only on top and did just that - rounded it only on top. I attach my brave solution that itself is a rewritten version from this post.

How would I resolve that?
1. Somehow get two Rainmeters running at the same time, with one rendering top corners and one bottom corners. (Definitely not the best solution)
2. Write a simple C# app that would spawn two windows, one rendering top corners, and one rendering bottom corners. (I wouldn't feel particularly safe running that, as anticheats in some games could flag it)
3. Wait for someone more knowledgeable than me to think of some other solution, as I used Rainmeter for maybe 2 hours in the last 5 years.
Attachments
Rounded Corners Bottom.ini
Correct bottom one
(880 Bytes) Downloaded 180 times
Rounded Corners Top.ini
Correct top one
(804 Bytes) Downloaded 188 times
Rounded Corners.ini
(760 Bytes) Downloaded 193 times
Last edited by istir on April 18th, 2022, 8:58 pm, edited 1 time in total.
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Rounded Screen Corners

Post by Yincognito »

balala wrote: April 18th, 2022, 4:05 pm I doubt. In fact reading your reply I tried this out and it seems not to be correct. I set one skin, then more (three, but not all) to "Stay topmost" and general windows still gone behind the taskbar. To be honest I can1t see how the setting of skins could affect how general windows are behaving.
Or am I missing something again?
Well, I don't see why it does affect it either, but this skin, being all over the screen, does that.
I don't think you miss something here, but you might misunderstand what the OP wants: he actually wants general windows to be behind the taskbar (since it's the normal behavior). With this skin, this is only achievable by making it slightly smaller than full screen height, i.e. subtracting 1 px from both shapes' height formulas. I tried adding another shape and combining them to 'exclude' a 1 px horizontal line right above the bottom corners so as to not affect the skin visually, but it didn't work - it seems istir is right and it has to do with the skin having the screen dimensions... :confused:
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Rounded Screen Corners

Post by Yincognito »

istir wrote: April 18th, 2022, 4:36 pm 1. Somehow get two Rainmeters running at the same time, with one rendering top corners and one bottom corners. (Definitely not the best solution)
Hmm... good idea, but maybe two skins (one for the top and one for the bottom, positioned accordingly) might be better than running two Rainmeters. Two skins loaded instead of just one should be achievable. ;-)
istir
Posts: 4
Joined: April 18th, 2022, 4:16 pm

Re: Rounded Screen Corners

Post by istir »

Yincognito wrote: April 18th, 2022, 4:54 pm Hmm... good idea, but maybe two skins (one for the top and one for the bottom, positioned accordingly) might be better than running two Rainmeters. Two skins loaded instead of just one should be achievable. ;-)
If I get what you mean it sadly doesn't work. I loaded top and bottom ones as two different skins and it loaded them as "one". I attached the one I tried loading.
Attachments
Rounded Corners Bottom.ini
(762 Bytes) Downloaded 191 times
Post Reply