wwmm / easyeffects

Limiter, compressor, convolver, equalizer and auto volume and many other plugins for PipeWire applications
GNU General Public License v3.0
6.51k stars 269 forks source link

New App info UI #1427

Closed Digitalone1 closed 2 years ago

Digitalone1 commented 2 years ago

Given the issues related to the current layout, I made a new one for testing.

Schermata del 2022-03-12 23-22-56

@wwmm What do you think? Any hint?

The space should be more optimized with this layout and scrolling doesn't change the app volume (#1211).

@wwmm I take this opportunity to ask another thing. I didn't notice before, but getting rid of GTKMM the locale format is not applied anymore. I see you use ftm library now. Is it intended to not have the locale or you forgot to implement it? Ftm has L key to format to locale.

Digitalone1 commented 2 years ago

I improved the alignment of the middle dot making it more contered. Will do the merge request in the next days when I will fix other things.

Anyway the next step for this topic is setting a user message when the windows is empty.

wwmm commented 2 years ago

Anyway the next step for this topic is setting a user message when the windows is empty.

Ok. I will try again to do a boxed list.

wwmm commented 2 years ago

I am playing a little with the linked style class and I think we should consider making use of it in some places Screenshot from 2022-04-01 11-46-53 It helps to make things more compact in some situations.

wwmm commented 2 years ago

The lack of alignment between the 3 informational lines started to look weird after some time. So I did some small changes to the layout and gave up on the GtkSwitch Screenshot from 2022-04-01 12-52-45

Digitalone1 commented 2 years ago

Okay.

Yesterday I gave up on another thing. The volume level is not immediate with spinbuttons, so I thought to add e levelbar under the row where there are the mute toggle button and the volume spinbutton.

It was not so bad, but the line was changing color when below 75%. I thought it was better if it would be always blue. At 100% is green, I don't like it. But GTK does not offer an easy way to change the offset state.

Then during tests I also had a crash. I saved the error in the notepad:

'builder->data == ((void *)0) || builder->state.offset < sizeof(struct spa_pod) || builder->state.offset == (sizeof(struct spa_pod) + (((struct spa_pod*)(pod))->size))' failed at ../pipewire/src/modules/module-protocol-native.c:1289 assert_single_pod()
Annullato (core dump creato)

I don't know what it is. It seems related to Pipewire, but happened when I was changing volume on the spinbutton which was also updating the levelbar. Anyway I gave up. If you like the idea of adding a volume levelbar, take it in consideration.

wwmm commented 2 years ago

'builder->data == ((void )0) || builder->state.offset < sizeof(struct spa_pod) || builder->state.offset == (sizeof(struct spa_pod) + (((struct spa_pod)(pod))->size))' failed at ../pipewire/src/modules/module-protocol-native.c:1289 assert_single_pod() Annullato (core dump creato)

I have no idea about what could have caused this. But changing/reading volumes involves dealing with spa pod objects. Somehow something went wrong in this process.

If you like the idea of adding a volume levelbar

I don't really have an opinion on this yet but I wonder if some users would not confuse it with the level bars that usually would be measuring the application signal level.

Digitalone1 commented 2 years ago

I don't really have an opinion on this yet but I wonder if some users would not confuse it with the level bars that usually would be measuring the application signal level.

Yes, probably.

wwmm commented 2 years ago

I wonder if with the new layout it would not be better to show a generic icon in the cases where the stream has no icon Screenshot from 2022-04-04 18-50-41

Digitalone1 commented 2 years ago

Maybe a speaker icon for output streams and a microphone for input streams.

Before the release I'd like also to see a message when the list is empty to inform the user EasyEffects is not managing any stream.

Gnome File is doing this for empty folders:

Screenshot from 2022-04-09 12-57-45

I don't know which would be the correct sentence. Maybe Empty List: No streams handled by EasyEffects

@wwmm any thought?

Digitalone1 commented 2 years ago

I wonder also if Enable could be better than Activate. @wwmm why did you choose Activate?

wwmm commented 2 years ago

why did you choose Activate?

No special reason. It seemed better at the time but after some time using it there is no difference to me. Both names are fine.

Maybe a speaker icon for output streams and a microphone for input streams.

As we already use these icons a lot I think it is better to use an icon that gives the "media idea". I do not think that we have to use different icons for each pipeline. If we can it is better. But it is not a problem to have the same generic media icon on both sides.

I don't know which would be the correct sentence. Maybe Empty List: No streams handled by EasyEffects

I also do not have a good sentence in my head right now. Let's start with the one you thought. This is the kind of thing that can be easily changed in the future.

Digitalone1 commented 2 years ago

Searching in Adwaita icon folder I see

which could be two good candidates.

wwmm commented 2 years ago

At least to me applications-multimedia-symbolic is the better option. The other makes me think about a smartphone.

Digitalone1 commented 2 years ago

I can't look at the code right now, but I'd like to get an hint on how this could be done in the future.

I was thinking about adding a vertically expanded row with the empty state text. That row would be shown when the app list count is 0, otherwise it's hidden. Is it doable or we have to look at another hack?

I don't even know if there's a special class to show the text in a bigger size, similarly how Gnome File is doing.

wwmm commented 2 years ago

I was thinking about adding a vertically expanded row with the empty state text.

I think there is a container that can have only one child visible at a time. With it we could select what is visible depending on whether there is app or not. It does not have to be something that expands. I will try to remember this container name.

wwmm commented 2 years ago

Maybe this one https://docs.gtk.org/gtk4/class.BinLayout.html. But it may be a good idea to see how nautilus is implementing this.

wwmm commented 2 years ago

This is the nautilus commit that added the Folder is Empty https://gitlab.gnome.org/GNOME/nautilus/-/commit/69b5caad316bd39d4f13010e1dcfe7296f69ff68. They seem to be adding an overlay.

wwmm commented 2 years ago

The overlay approach is easy to implement but for some reason I do not understand it goes over widgets that are outside its parent container Screenshot from 2022-04-12 11-59-06 Somehow this does not happen on Nautilus... I wonder why...

wwmm commented 2 years ago

There is a way to avoid the problem Screenshot from 2022-04-12 12-25-38 I had to set gtk_overlay_set_clip_overlay(self->overlay, GTK_WIDGET(self->overlay_empty_list), 1). But it does not seem nautilus needed to do this...

wwmm commented 2 years ago

@Digitalone1 the message we talked about before seems too long Screenshot from 2022-04-12 12-36-04

wwmm commented 2 years ago

As the code is working I have updated the master branch with a shorter temporary message until we have a better idea Screenshot from 2022-04-12 12-42-26

Digitalone1 commented 2 years ago

It does not have to be the same size as Nautilus. Try to reduce the scale. I suggest to apply also the wrap property

<property name="wrap-mode">word-char</property>

You could also add the default app icon when there's no icon available.

wwmm commented 2 years ago

I suggest to apply also the wrap property

I wasn't thinking about the wrapping. It feels like it is too much text to read in a situation where the message should be more direct.

Try to reduce the scale.

In nautilus they use <class name="large-title" />. I will try to see if there is something smaller.

Digitalone1 commented 2 years ago

At this point let's also add a No Effects Applied when the plugin stack is empty (but in the plugin view, not in the plugin stack itself).

wwmm commented 2 years ago

The class title-3 combined with dim-label and the icon pixel_size set to 64 instead of 128 seem more reasonable Screenshot from 2022-04-12 12-56-40

At this point let's also add a No Effects Applied when the plugin stack is empty (but in the plugin view, not in the plugin stack itself).

Ok. If we are lucky the same approach can be used there too.

You could also add the default app icon when there's no icon available.

I will try to remember to do this too. But I am not sure if there will be time for this today.

Digitalone1 commented 2 years ago

Maybe it's also better to change the Effect icon in emblem-music-symbolic emblem-music-symbolic

And use this icon for the empty state in Effects tab.

wwmm commented 2 years ago

Maybe it's also better to change the Effect icon in emblem-music-symbolic emblem-music-symbolic

New version Screenshot from 2022-04-12 13-05-07

but in the plugin view, not in the plugin stack itself

I wonder if space is not going to be a problem. In the stack location there is plenty. But not so much in the plugins list panel.

Digitalone1 commented 2 years ago

@wwmm I was talking about the Effect button icon, not the empty state icon in the app list (which I think the previous was better).

I wonder if space is not going to be a problem. In the stack location there is plenty. But not so much in the plugins list panel.

I was talking about the parent widget where the plugin commands are shown, not the plugin list side panel.

wwmm commented 2 years ago

I was talking about the Effect button icon, not the empty state icon in the app list (which I think the previous was better). I was talking about the parent widget where the plugin commands are shown, not the plugin list side panel.

Oh... That is why we should not write code minutes before going to lunch :smile:

As the plugins controls are inside a GtkStack I thought you were suggestting to put the message over the listview at the left side.

New version Screenshot from 2022-04-12 13-43-20

jannuary commented 2 years ago

Let's not reinvent the wheel here: Adw.StatusPage

wwmm commented 2 years ago

Thanks @jannuary! As I was reading the nautilus code I just did the same thing. I did not even consider the possibility Adwaida could have a class for this Screenshot from 2022-04-13 01-48-47

Digitalone1 commented 2 years ago

So what remains for a new release? Only the StatusPage for Effects tab and the default icon for application with no icon?

wwmm commented 2 years ago

So what remains for a new release? Only the StatusPage for Effects tab and the default icon for application with no icon?

I think it would be good to have these 2 in the next minor release.

Digitalone1 commented 2 years ago

I noticed a weird thing about the selectable property with app name and description.

I launch the application and change the tab, then return to the applications list and the app name is selected even if I didn't select it with the cursor.

I didn't expect this behavior, it occurs frequently, but only one time after I open the window. Might be a GTK issue, anyway we could consider to remove the selectable property even if I thought It was useful for the user to copy the app name...

wwmm commented 2 years ago

the app name is selected even if I didn't select it with the cursor.

Strange. It did not happen here. But as we do not need these labels to be selectable I think we could just disable this property.

wwmm commented 2 years ago

I think we can close this.