Masque

Masque

7M Downloads

Feedback: Scaling Issue with 10.0.0 and Built-In Bars.

kstange opened this issue ยท 30 comments

commented

I adapted an old mod called MasqueBlizzBars for the 10.0.0 version of WoW. This just effectively calls AddButton() on all the system action bar buttons and it works great... except with Masque 10.0.0 the scaling is off unless I set the Classic Scaling option in Masque 10.0.0. I don't have built-in blizzard options to adjust scaling in way that fixes this problem.

Is there a way I can direct Masque to scale itself differently for these buttons in the Masque API? I didn't see anything in the documentation.

Masque 10.0.0:
image

Masque 9.2.7:
image

I had commented on this previously in #250 but it was slightly off topic and might have been overlooked there.

commented

Before Update to 10.0
before

After Update to 10.0
after

EDIT: Use ElvUI

commented

@kstange You'll need to implement some sort of hook into the update function when the buttons are scaled using the edit mode. Masque doesn't keep track of the sizes, that's up to the add-on passing the buttons to Masque. Whenever the buttons are scaled, Call {Group}:ReSkin().

@T-a-z Enable Classic Scaling in Masque's options. General Settings / Interface

commented

This feels backwards. Why is the "modern" method you're using set to scale the UI's button to the size of the skin rather than scale the skin's button up to the space the UI wants it to take up?

commented

Not sure what you mean. The size of the skin is dictated by the skin itself. The size of the button is dictated by the add-on providing the button. Masque doesn't change the button's size, it only applies the skin based on the button's size, using the settings the skin provides, modified by the scaling factor.

In the example above, I used the icon because that's the starting point of any skin. All of the other regions are generally designed around the icon's size, etc. If you take a basic, pre-DF button (36 x 36) it, by default, has an icon size of 36 x 36. Therefore the scale factor that Masque has always used was 36. This ensures that regardless of the size of the button, as long as the add-on tells Masque to update, all of the regions will be scaled relative to the button's original size.

commented

@kstange You'll need to implement some sort of hook into the update function when the buttons are scaled using the edit mode. Masque doesn't keep track of the sizes, that's up to the add-on doing the skinning

I don't think I understand what you mean. The buttons aren't being scaled. At initial login at 100% UI scale and 100% bar scale they still show as basically 80% of the size of the actual in-game buttons. The question is why is Masque actively scaling down the button from its original dimensions.

See these are the properties of the button before AddButton is called with the icon being 45x45:
image

Then when AddButton is called, Masque replaces the Icon size with 36x36:
image

I really don't think Masque is detecting or honoring the new default target size of buttons properly.

commented

@StormFX
Thanks, that fixes the issue.
What is the difference to the old scaling, should I change all the settings to the new scaling?

commented

@T-a-z The Classic Scaling option is global.

@kstange Masque scales the regions of the button based on the size of the button and whether Classic Scaling is enabled. To better demonstrate what happens, assuming an action button in Dragonflight (45 x 45):

Default Scaling: 45

Button Size: 45 x 45
Scaling Factor: 45
Icon Size (Set by the skin): 36 x 36

45 (Button) / 45 (Scale Factor) = 1 * 36 = 36 Icon Size

Classic Scaling: 36

Button Size: 45 x 45
Scaling Factor: 36
Skin Icon Size: 36 x 36

45 (Button) / 36 (Scale Factor) = 1.25 * 36 = 45 Icon Size

What I meant by mentioning hooking is that when edit mode is used to change the size of the icon/button, Masque doesn't know that it's happening. Your add-on has to tell Masque to update.

commented

Is it intended that all Masque skins produce buttons that are visually 36x36 or are they supposed to scale up to the actual defined size of the button they are being told to skin?

It's intended that the regions be whatever size the skin author decides. If the button is larger/smaller than the scale factor, the skin gets scaled.

commented

Okay, then the next question: Why have you updated the scale factor to 45 only for ActionButtons for Dragonflight, as that implicitly shrinks all the existing skins to 80% of their previous defined size?

commented

What I presume you're saying is that the skins are staying the same size, regardless of the size of the buttons (eg, changing them in edit mode).

commented

What I meant by mentioning hooking is that when edit mode is used to change the size of the icon/button, Masque doesn't know that it's happening. Your add-on has to tell Masque to update.

This issue isn't one I am experiencing. When anything in the UI is rescaled everything is updated accordingly and Masque always applies its textures at 80% of the size the button is normally drawn at.

Not sure what you mean. The size of the skin is dictated by the skin itself. The size of the button is dictated by the add-on providing the button. Masque doesn't change the button's size, it only applies the skin based on the button's size.

Masque isn't resizing the button frame, true, but it is effectively scaling down the button visual. Why does the skin define 36x36 icon size for UI buttons that are supposed to be 45x45? Wouldn't you always want to scale up all the assets to fit the dimensions the button wants to be by default? This doesn't feel like it's the addons' fault, then, but rather that all the Masque skins are asking addon users to oversize their buttons to compensate for undersizing by the skin.

I just want to reiterate that the game's UI scaling and Edit mode functionality is not influencing anything here. The way Masque applies itself to the button is the same relative 80% reduction in target visual size wither I set the bar or UI scale to 200% or 50%.

commented

What I presume you're saying is that the skins are staying the same size, regardless of the size of the buttons (eg, changing them in edit mode).

The Masque skinned button is scaling properly in Edit mode, it's just that it is always 80% of the visual size of what the same DF native button would be in the same place.

commented

I guess maybe my primary misunderstanding might be best answered with the following question:

Is it intended that all Masque skins produce buttons that are visually 36x36 or are they supposed to scale up to the actual defined size of the button they are being told to skin?

I can tell you that using frame inspector, as in my screenshots above, the defined size of the buttons' net regions are effectively 45x45, regardless of what the UI scaling parameters are set to throughout the game. When the Masque skins are applied they are replacing those 45x45 regions with 36x36 regions set into the middle of the button frame.

commented

Why does the skin define 36x36 icon size for UI buttons that are supposed to be 45x45?

The size of the button is only relevant to scaling. The skin author gets to decide how the button looks. That's the entire point of creating skins -- to make buttons look how you want them to.

Wouldn't you always want to scale up all the assets to fit the dimensions the button wants to be by default?

I mean, it could be done that way, but that would remove a lot of agency from the skin authors. Additionally, if skins were constrained to the size of the button, skin authors would have to reduce the size of the icon to fit the rest of the "frame" around it. Not to mention that Masque would have to track every single button's actual size and react accordingly, including custom buttons from add-ons that have their own scaling system.

The simplest solution to make sure scaling is consistent and universal is how it's currently implemented.

The way Masque applies itself to the button is the same relative 80% reduction in target visual size wither I set the bar or UI scale to 200% or 50%.

commented

Okay, but I am working on an addon skinning default base UI buttons which are already 45x45. These buttons are natively 45x45 and the Caith skin for example is 36x36.

Honestly, I think you're over-thinking it. Users will be happy with an add-on that adds Masque support to the default UI. The size of the skins shouldn't really be your concern. if users don't like the size, they can use the setting in Masque or try a different skin.

Are you going to consider updating the Action Bar definitions in the skins you release to define Action Buttons at 45x45 going forward?

Any skin author can do what they want with it. They can make separate skins for Dragonflight/Classic, they can even manually set the skin for every single type of button so that it's sized perfectly to fit every (default) button type, if they want to put in that much effort. Asking for every single skin to accommodate every possible button configuration is asking a lot.

Can I hard override the Masque scaling factor for my own addon when referencing Action Bars?

That's a dark road that lends to the biggest problem. You have the base size of various buttons, you have skin authors who design skins at specific sizes (there's even a few skins with snarky comments about Masque's scaling and custom functions that do exactly what Masque does), then you have add-ons, whose buttons can be varying sizes and types and lastly, you have the users themselves, who will want their UI to look a certain way. This is why the scale factor exists. Take a button, check it's size, use the factor as a baseline and scale the skin accordingly. If users want smaller/larger buttons, they can scale them in the add-on. (I realize that's not an option for you, but you get the gist). Otherwise, it becomes of huge cluster-bomb of competing opinions and preferences.

As noted I would prefer not to tell users that to get the intended behavior they have to turn on Classic Scaling.

You shouldn't have to. If they want bigger buttons, they can turn it on. If they want the skin at its intended size, they can leave it alone.

commented

I can tell you that using frame inspector, as in my screenshots above, the defined size of the buttons' net regions are effectively 45x45, regardless of what the UI scaling parameters are set to throughout the game. When the Masque skins are applied they are replacing those 45x45 regions with 36x36 regions set into the middle of the button frame.

That's because of scaling. If Classic Scaling is disabled, then the skin is to 100% scale, assuming a DF action button (45 x 45). If Classic Scaling is enabled, the button is scaled to 125%. If anything, technically people should be using the default scale factor of 45. But apparently it was easier for me to add an option than for other people to update their UI. :p

Why have you updated the scale factor to 45 only for ActionButtons for Dragonflight, as that implicitly shrinks all the existing skins to 80% of their previous defined size?

Only action buttons have had a size increase. All of the other buttons are still the same size they've always been. There was no need to rescale them as they're scaled exactly as they were before Dragonflight.

commented

It may seem like on a 45 x 45 button, the icon would be 45 x 45, but as I mentioned, that's up to the skin author. Whether it fills or overlaps the actual frame of the button is irrelevant. The scale factors only exist as a baseline to scale things from so that the skin regions are scaled correctly, relative to their intended look.

commented

Okay, but I am working on an addon skinning default base UI buttons which are already 45x45. These buttons are natively 45x45 and the Caith skin for example is 36x36. Are you going to consider updating the Action Bar definitions in the skins you release to define Action Buttons at 45x45 going forward? That change plus the scale factor change would effectively restore the original sizing for everyone, right?

I don't really have the same flexibility as Bartender, for example, because these are not my ActionBars and the functionality of Masque has swapped out from under me. I get that is in a way "not your problem" but I'm trying to think of a solution that doesn't require me to start really second-guessing Masque or Blizzard because then it causes side effects or the code gets fragile if anyone else changes anything. Like if I scale up the buttons back to 1.25 then they will have overlapping button frame issues.

Can I hard override the Masque scaling factor for my own addon when referencing Action Bars? As noted I would prefer not to tell users that to get the intended behavior they have to turn on Classic Scaling.

commented

Sorry to keep you up when you should be sleeping and thanks for humoring me! Sleep well.

commented

Okay, but I am working on an addon skinning default base UI buttons which are already 45x45. These buttons are natively 45x45 and the Caith skin for example is 36x36.

Honestly, I think you're over-thinking it. Users will be happy with an add-on that adds Masque support to the default UI. The size of the skins shouldn't really be your concern. if users don't like the size, they can use the setting in Masque or try a different skin.

In order for me to be happy with this solution, as a user of my own addon and of Caith, I would need to know that this option is "permanent" and won't eventually go away. Could you consider making it applicable per Group? I guess it might be problematic to replace the toggle with a scale slider, and probably not justified for addons like Bartender, even though it would definitely help in my case.

Are you going to consider updating the Action Bar definitions in the skins you release to define Action Buttons at 45x45 going forward?

Any skin author can do what they want with it. They can make separate skins for Dragonflight/Classic, they can even manually set the skin for every single type of button so that it's sized perfectly to fit every (default) button type, if they want to put in that much effort. Asking for every single skin to accommodate every possible button configuration is asking a lot.

This difference in the native buttons makes me feel in ideal world that skins would define a separate configuration for DF buttons vs Classic buttons so that they are relatively the same. I imagine that could be done inside the same skin by checking what client is loaded and would restore the "spirit" of the skins' original designs vs the UIs they were expecting to fit into.

commented

In order for me to be happy with this solution, as a user of my own addon and of Caith, I would need to know that this option is "permanent" and won't eventually go away.

Its existence is base solely on the fact that there's two different UIs in the game. If, by some miracle, Blizzard back-ported the new UI to the Classic versions of the game, the old scale factor would become irrelevant.

Could you consider making it applicable per Group? I guess it might be problematic to replace the toggle with a scale slider, and probably not justified for addons like Bartender, even though it would definitely help in my case.

I'd have to give it some thought and do some math to see how it would work.

This difference in the native buttons makes me feel in ideal world that skins would define a separate configuration for DF buttons vs Classic buttons so that they are relatively the same.

This is the opposite of what the Classic Scaling option does, though. Dragonflight's default scale factor is 45, while Classic's is 36. For both clients, skins are at 100% scale (of the skin's definition). The Classic Scaling option exists to compensate for add-ons like Bartender using a migration option to scale down their bars to maintain their users UIs.

As far as native buttons go, they're more the exception than the rule. I don't mean to sound dismissive, but Masque was intended to be used by add-ons, not the default UI, despite the fact that a lot of add-ons use configurations based on the default UI.

As I mentioned above, I'll give it some thought and see if I can't come up with a reasonable solution. As it is now, I've got about 3.5 hours until I have to be up for a 14-hour shift. I'll let ya know if I come up with something.

commented

If anything, the buttons should be the correct size with the scaling off using the default buttons and larger with Classic Scaling enabled. Make sure your UI scale is the same as it was before, because it may have changed. The UI scaling itself has also changed somewhat. Worst case, if they look the way you want with Classic Scaling enabled, enable it. :P

commented

The UI scale settings in the base game don't seem to affect how the buttons appear. The buttons are set to 100% scale in the Edit mode panel, with UI Scale disabled (or enabled at 0.75) and still show at the same relative reduced scale regardless of my selection. I really don't want to use the addon with Classic Scaling enabled because I'd like to publish the addon for other people and not have to tell them to use that setting to avoid weird behavior.

If there's some way I can influence masque to treat the button scaling as 125% it seems like it might fix the problem, though I am struggling to understand why that is necessary since I would expect it to apply to the real boundaries of the existing buttons at their actual scale.

commented

First of all - thanks for keeping Masque up and running!

I found it a bit difficult to adjust Bartender to get the "old" look back so in the end I opted into the Classic Scaling option.
While Bartender reduced the scale of the bars/buttons, I also had to configure a negative padding to get the buttons close together. That led to a situation where the bars where (visually) unusable as soon as I switched Masque off (which might happen from time to time after WoW patches).

Just wanted to give my experience with the recommended(?) way of adjusting Bartender settings to make it fit. Maybe you could (temporary) add the hint for the Classic Scaling option to the addon provider pages as I probably wouldn't have found it without looking through the changelog and reading this github issue. :)

commented

I actually originally was going to put a pop-up on log-in notifying people to look at the change log but decided not to. Generally-speaking, common practice is to look at the release notes if you have questions about an update. :p

commented

Enable Classic Scaling for now (Masque Options / General Settings / Interface).

commented

@kstange After doing a little thinking and a lot of math (or maybe it was the other way around, I don't remember), I'm probably going to revert to the old scaling method globally and then add a per-group slider so that users can tweak the skin a bit if they want to.

My reasoning for reverting is that, in spite of the increased size action buttons in Dragonflight, most (if not all) skins are designed around a 36 x 36 button. Given that action buttons in DF are 45 and most other buttons in both Retail and Classic are 30 x 30, this is a nice mid-range compromise that should keep scaling a bit more consistent.

commented

Thanks so much. This will definitely smooth over the experience quite a bit!

commented

Try out 10.0.1-Beta. :p

commented

Everything seems to be working great now. Thank you for the quick turnaround.