 Hi, and welcome to yet another episode of Nickelodex Credit It Doesn't Deserve. In this episode, we're going to talk about the corners back, which in theory should be gone, like gone forever and something like that. Now, just a bit of context, if you don't know what the corners back is. So it has happened very frequently to users that they, as an example, either switch to a different theme or even stay on breeze. And then at the corner of their windows, they see these white dots, especially if they're using a drug theme, they're very noticeable, which is rightfully annoying. And also, those part of the areas on the corners of the bag of the windows is that blurred, and it's white. So it's annoying. What was going on with that, let's quickly explain why the bag was there. And as always, in these cases, if there's a bag that it's running for such a long time, it means that it's actually different bags acting all together and seeming like the same bag. But of course, to take down the corners bag, you had to take down all of the bags. So quickly, an introduction to the corners bag, I feel like I've talked about this like 10 times, but stay with me here. So whenever you see a translucent window in KD Plasma, there's actually three, three layers. The first one that you see in front, of course, is the actual translucent window. But behind it, there's another layer, which is the blur. Of course, it takes the wallpaper and then blurs it. But behind that, there's even another layer, which is the contrast effect. The contrast effect basically makes sure that there's always enough contrast for the window that's transparent. As an example, if you have black text, then if you have a very bright wallpaper, then it's fine. It won't touch it much. Whereas if you have, you know, a very dark wallpaper, it's dark on black. So it actually lights up, you know, pumps up the lightness to make sure that you can still read the text. So these are the three layers. What's the issue? Well, the issue is that the corners, if the translucent window has rounded corners, of course, in theory, you should tell the blur and the contrast effect layers to have rounded corners too. Otherwise, at the corners, you will see a blurred area because of course, the blur layer, but also a light area because of the contrast effect. And this explains both the blurriness and the light dots at the corners. They are given by the blur and the contrast effect, respectively. So that happens when, you know, things should be rounded and aren't in the layers behind the rounded corners window, correct? Kind of. As I said, this is actually talking about three different bugs in one. So the first one is about windows and only windows. So like dolphin system setting, this kind of things. And by default, we do not have rounded corners with blur underneath because breeze doesn't doesn't have any blur. So this only happens either if you have a third party theme, or if you're using a K-Win script that blurs behind the windows out of by force. If you're using a K-Win script that blurs with force, then it's kind of new. You know, it's due to the script. Whereas if you use a third party decoration up until just a few months ago, I think, well, the third party decorations couldn't actually set rounded corners for the blur and the contrast effect. They just couldn't. This has been implemented not by me, but by Saif Idotos, the developer of Latidoc, who actually stepped up and fixed corners back for windows only. And the issue here was simply that third party decorations couldn't tell the blur and the contrast effect to have rounded corners at all. Now, they can. There's an EPI for that. So that leaves with two bucks. So these ones affect dialogues, which is, you know, kickoff, gear runner, and the calendar when you open it, all the dialogues that are styled as plasma dialogues, which means they are transparent and they have rounded corners on all sides. Of course, since they are transparent, they have the blur and contrast effect out of the box. As an example, if we take this one, which is technically not a dialogue, but it's very similar, you can see that it does have blur behind it. If I go here, you can see it is blurring the wallpaper. And this is a dialogue. And you can see it's also blurring the wallpaper. So these things do blur the wallpaper. So where's the issue? Well, of course, we aren't dumb. And we made sure that the theme, the plasma theme is allowed to say, hey, blur and contrast effect. I want 1200 corners. And that's doable. However, what happens? Let's actually switch to dark theme to see that. I'm really sorry that my widget is not adaptive yet. I'm still working on it. Please ignore that. Okay. Now, if you look closely at the floating panel, which I've just set, you can see that it has these four bright corners. So what's going on with that? Because I've just told you that yes, the plasma theme can say the blur and contrast effect thing is to be rounded. So what's up with that? So the issue here, sadly, is that whereas the window corners are anti-aliased, meaning they actually look like rounded, there are all the blurry pixels to make it look like a rounded corners. The mask, which is actually the area which tells the blur and the contrast effect were to be applied, isn't anti-aliased. It's just an area which means it's pixelated, which means that we are drawing something that's actually rounded into something that's pixelated. And that leaves like fractions of pixels all around which are visible to users. And where, you know, you see the blur and adaptive transparent, the contrast effect, sorry, but you don't see the actual window because it's rounded, whereas this is pixelated. And that, that's the issue. Sadly, that's the issue. So one solution would be to make sure that the blur mask and the contrast effect mask are also anti-aliased. And that's sadly unfeasible. So there was another solution, which again was not done by me. I'm just reporting something that somebody else has done, which is to always make the mask a bit smaller, like one pixel smaller compared to what it should be. Why, why, why? Well, this way it will still be pixelated, but at least it will be covered by the windows corner because you drawn this pixelated thingy underneath the window. So it's still, it's still pixelated, but at least you don't see it. That's the whole point. So Marco Martin, another core KD Plasma developer, my application launcher is gigantic, actually implemented this for all dialogues corners. And if you go take a close look, you can see that the dialogues do not have this bug. Before this, they had, I had to try to fix it unsuccessfully, but Marco actually addressed it by making the mask one pixel smaller on each side. Nice. So what was missing? Well, you know, the panel, the actual panel, is not a dialogue. It's not written using a dialogue, which means that the fix that was applied to dialogues, again, K-runner, calendar, kickoff, everything, did not apply to the panel because it's not a dialogue. As simple as that. So what did I do? I wanted to take the bug off to the panel, which was the very last place where we had this corner's bug. And the idea was to take the panel and just apply the same very thing that Marco did, but to the panel, which sounds easy. Kind of was, kind of wasn't. So let's get slightly technical, but stay with me. I'm sure you can make it. How do we make sure that the mask is slightly smaller? You, you maybe say, but you just take the mask and you make one pixel smaller. Well, here's the thing. You cannot actually resize the mask. The mask is implemented as a Q-region, it's called, and Q-region's class in QT does not have the ability to resize. Funny. Not so funny. So how did Marco do it for the dialogues? So this is pretty funny, actually. You take the dialogue, you say the dialogue. Okay. From now on, at a certain point, pretend that you are one pixel smaller on each side. The dialogue is like, okay. And then you ask the dialogue for its mask, and the dialogue provides its mask. And then you say the dialogue. Okay. Now, grow again by one pixel on each side. And it's like, okay. And then say, now you draw the window using the mask from before. And that works. You're actually using a smaller mask. You didn't resize it. You resize the whole dialogue. And then you ask for a mask and then you resize it back. That works. Could I do the same for the panel? No. Because technical details. So what did I do? Well, I looked at the documentation of the Q-region, which again, you cannot resize, but listen to me. You can intersect it with other Q-regions. And you might see the point. Think about how you can resize a mask just using intersections. Think about it. Got it? Yeah. So you take the mask, you move it one pixel from each side. So you get four masks that are all like off center by one pixel. And then you intersect the four of those. Boom. You actually resize it to be one pixel smaller. Kind of. It's not a resize, but as the mask for the panel is very simple. So in practice, you are resizing it to be one pixel smaller. So you cannot resize it, but you can intersect it. And using the intersections, you can create four masks with that intersected with each other, become one pixel smaller compared to the original. Was that it? Yes, kind of. This means that the corners bag won't appear anymore to the panel. Now, just this morning, I woke up and that's a user complaining about a bag on Reddit. One thing, please, if you meet a bag, please open a bag report in the bag tracker. Do not open a Reddit post because I might not see Reddit post. I do see all bag reports about Kitty Plasma. So please open a bag report, not a Reddit post. This said, this user was complaining that he could see his wallpaper throughout the panel in the bottom and on the top and the bottom pixel. Just one pixel, but he could see his wallpaper through that pixel and immediately thought, Oh, I know what's going on here. I resized the mask to be one pixel smaller on each side, which means that now on all sides, it's actually one pixel smaller, which means that on the top and on the bottom, there's not blur, which means that you can actually see the wallpaper through that one pixel. It's still covered by the panel, but the panel is transparent, which means you can still see the wallpaper not blurred. How do I fix that? I have no clue. I just saw the bag and I don't know. I don't get paid enough. Don't kick about, I don't get paid enough. Seriously, I don't get paid enough. Currently, I'm working at a kitty and this channel and a podcast at like five euros per hour, which is not much. So actually, thanks to all the patterns that actually make me reach that number. If you want, feel free to donate something on the channel. I'm trying my best to make Katie Plasma more stable. And this is just the first video of a series of videos about some bug fixes that I've recently done to Katie Plasma and focusing a lot on bug fixing Katie Plasma. I think I'm doing a good job. So if you'd like to see a more stable Katie Plasma through me, because you're donating to me and not Katie, but if you don't want to donate to me, I'd be happy. Thanks everybody and I'll see you tomorrow with another video.