Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: optimize Volume icons #699

Merged
merged 1 commit into from
Oct 15, 2023
Merged

feat: optimize Volume icons #699

merged 1 commit into from
Oct 15, 2023

Conversation

dyphire
Copy link
Contributor

@dyphire dyphire commented Oct 14, 2023

No description provided.

@tomasklaen
Copy link
Owner

I already tried this once as I like the idea, but in practice, the way the icons are positioned in the font, the speaker part of the icon keeps shifting horizontally as the icon changes.

dynamic_volume

And for me personally, the shifting annoyance outweighs the eye candy from dynamic icon.

But if others don't mind, I'd merge this.

@natural-harmonia-gropius
Copy link
Contributor

natural-harmonia-gropius commented Oct 14, 2023

the shifting annoyance outweighs the eye candy from dynamic icon.

ass:icon(self.ax + (width / 2), self.by, width * 0.7, icon_name,

Change (width / 2) to a fixed value?

Hmm... the character not aligned. Also haven't been fixed in material symbols.

image

@dyphire
Copy link
Contributor Author

dyphire commented Oct 14, 2023

Yes, the icons themselves are not aligned. I personally don't mind much about this, but let's wait for the opinions of others.

@xfzv
Copy link
Contributor

xfzv commented Oct 14, 2023

I don't mind the speaker part shifting horizontally as far as I'm concerned. Ideally it would be static but if that's not feasible, I'm fine with it.

@christoph-heinrich
Copy link
Contributor

It should be possible to prevent the shifting by using alignment 4 instead of 5, but then the icon won't always be perfectly centered. I don't think the shifting would bother me all that much.

osc.lua also has a symbol for >100% volume
image
But that doesn't seem to be an official symbol. mpv ships it's own osd-font, and we happen to also ship font files, so someone could add a symbol for it... or we figure out how to put a text ! behind the icon and make it look fine, but simply putting a ! behind the icon name does not look fine.
image

@tomasklaen
Copy link
Owner

It should be possible to prevent the shifting by using alignment 4 instead of 5

I've tried that already and it didn't work. It seems like the icons are monospaced and align to the middle of their monospace width.

The only way to make it align would probably be to manually shift each icon by the necessary width fraction.

@tomasklaen tomasklaen merged commit 06cef7c into tomasklaen:main Oct 15, 2023
@tomasklaen
Copy link
Owner

So I tweaked it:

volume_unshift

@christoph-heinrich
Copy link
Contributor

Interesting that the offset required is exactly width/16 for each stage.
I'm honestly not sure if I prefer the stationary or always centered one.

@natural-harmonia-gropius
Copy link
Contributor

I'm honestly not sure if I prefer the stationary or always centered one.

Add an opacity "full volume" as background?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants