Skip to content

Gui: Adding Pause button working, full screen button and labels to buttons on main window gui#2634

Merged
georgemoralis merged 30 commits intoshadps4-emu:mainfrom
diegolix29:GuiNames
Mar 26, 2025
Merged

Gui: Adding Pause button working, full screen button and labels to buttons on main window gui#2634
georgemoralis merged 30 commits intoshadps4-emu:mainfrom
diegolix29:GuiNames

Conversation

@diegolix29
Copy link

@diegolix29 diegolix29 commented Mar 9, 2025

Adding labels to gui buttons and other Gui improvements

image

#2441

@RuskyDed
Copy link

RuskyDed commented Mar 9, 2025

Looks excessive to me, maybe it would be better to implement the labels as tooltips?

@diegolix29

This comment was marked as abuse.

@RuskyDed
Copy link

RuskyDed commented Mar 9, 2025

Just a suggestion, it would eliminate the need to adjust the position of the text as it looks kinda wobbly atm. Also I'd wait for Daniel, GHU7924 or rainmakerv3 as they are more knowledgeable on UI side of things

@diegolix29

This comment was marked as abuse.

@diegolix29

This comment was marked as abuse.

@RuskyDed
Copy link

RuskyDed commented Mar 9, 2025

That seems better, let's wait for the others to discuss

@diegolix29

This comment was marked as abuse.

@rainmakerv3
Copy link
Contributor

rainmakerv3 commented Mar 10, 2025

Looks good I think aside from the tooltip text color. I think you intend for it to change dynamically based on the theme color but that code is actually just going to set the tooltip text to be either always black or always white depending on what the window color is prior to applying any themes.

An easy fix would be to change the stylesheets where tooltip text color is the same tooltip background color (most of them have that mistake weirdly enough) and remove the blanket text color change. or i suppose just hardcode a tooltip base color and tooltip text color for everything like whats done for the compatibility tooltips, but I don't think it should just be text color that has a blanket color change

Also probably should be made translateable

@GHU7924
Copy link

GHU7924 commented Mar 10, 2025

I described how I see improvements for the toolbar here #2501 (comment).
Most likely, some of this cannot be implemented at the moment.
At the moment, from what is available in terms of functionality, I would do this.
toolbar1003
The fullscreen mode is the same as if you were pressing the F11 key, such an additional button may well be useful for some users.

As for the tooltips, on the contrary, we kind of got rid of them...
As a result, only game compatibility hints should remain from the tooltips.
comp

@DanielSvoboda has already tried the implementation of labels under the buttons in test mode.
I think he can talk in more detail about the problems he faced.

P.S. Personally, I'm in favor of the labels under the buttons, but as an optional feature.

@DanielSvoboda
Copy link
Member

DanielSvoboda commented Mar 10, 2025

Yes, I had tried to do the same, but it doesn't line up, as commented here: #2501 (comment)
A possible solution would be to put all the images with the same resolution
image

Using ToolTip seems to me to be the best solution at the moment.

As already mentioned, it is necessary to add the translation to these texts, it can be done like this for example:

    ui->playButton->setToolTip(
        QString("<span style='color:%1;'><b>%2</b></span>").arg(textColor).arg(tr("Play")));

If possible, add the text in en_US.ts "< name>MainWindow</ name>", if not, the BOT will do it later by opening a separate PR

@DanielSvoboda
Copy link
Member

This comment may need to be adjusted
image

@diegolix29

This comment was marked as abuse.

@GHU7924
Copy link

GHU7924 commented Mar 10, 2025

As I understand it, you've adjusted the icons and it really looks good.
I don't know if it's worth trying the bold version of the font, it will be better or worse?

I also have a couple of questions:

  1. There is no vertical line between the keyboard icon and the update icon (is it because of the theme or did you remove it?)
  2. The change slider is too far away (maybe you just moved it temporarily).
    This is my personal opinion, I don't impose it on anyone, but the toolbar should look like this:
    toolbar1003
  3. Does everyone think it's worth renaming the labels: Config -> Settings, Pads -> Controllers, KBM -> Keyboard, Rfrsh -> Refresh List (if possible)? (I don't know if there are any restrictions that may cause something to be displayed incorrectly)

let me know if it looks ok, i can do a change to have like one option for labels under, one for tooltip and one without anything.

Personally, I think that only two options will be enough - without labels and with labels that can be switched using a checkbox.
Image

No negativity, but in my personal opinion, the tooltips will be superfluous.

and thanks added the translations flag

You should also test translations to see that the text fits and does not crop or overlap elements on top of each other.
I recommend testing with a couple of languages: Russian and two more, where there may be large text.

@diegolix29

This comment was marked as abuse.

@GHU7924
Copy link

GHU7924 commented Mar 10, 2025

or u want that button to make the game window to go full screen?

Yes, so that the game window switches from the "Windowed" state to "Fullscreen", as if the F11 button were pressed.
(-F11: Toggles fullscreen)

@diegolix29

This comment was marked as abuse.

@diegolix29

This comment was marked as abuse.

@diegolix29

This comment was marked as abuse.

@diegolix29

This comment was marked as abuse.

@GHU7924
Copy link

GHU7924 commented Mar 10, 2025

  1. I don't like the full-screen icon because it stands out too much from the rest.
    (I drew my own version based on the Stop icon). If you don't like it, then you can do something like this:
    fullscreen-icon

  2. I suggested making a checkbox "Labels for toolbar buttons" in the GUI, but now I think it's not worth it, you can leave your option in the "View" section, it will be enough.
    But I will remind you that the name should be short, because in translations the name can be much longer than what is in English.
    There should be something like "Toolbar labels" (or something like that), and the checkboxes should probably be placed next to each other at the top.

  3. I understand that this is a taste, but I don't like that the explanation is displayed when you hover over the icon, so it might also be worth making another checkbox in the "View" section, something like "Show hover hint".

  4. Again, it's a taste, but I only said about the separators because the "Refresh" button belongs to the list of games (as well as the slider for resizing icons and searching), so it was possible to separate them from the settings. But I don't really mind if the separators are removed.

  5. About placing the elements in the middle... To be honest, I don't even know, it needs to be compared visually.
    Take three screenshots with different options:
    The first option, as it is now in the emulator, all the elements go sequentially one after the other,
    then your option (but for some reason the slider for resizing icons confuses me, it is somehow alienated),
    and the third option is to place the icon resizing slider next to the Refresh button. Move the "Search" as far to the right as possible (that is, align it to the right).

You need to publish a new commit to test and better understand all the new changes. Then we will discuss the changes and make additional edits, if necessary.

P.S. I'm only expressing my opinion and I don't pretend to be the truth, so if someone wants to add to or criticize something, then don't be silent.
I will be able to test the new commit until about 9 hours later (I won't say more precisely).
(I hope the online translator translated everything correctly and clearly.)

@diegolix29

This comment was marked as abuse.

@diegolix29

This comment was marked as abuse.

@diegolix29

This comment was marked as abuse.

@rainmakerv3
Copy link
Contributor

looking at this quickly, initial thoughts are that there's another sdl event loop added which is probably not ideal, I'm not sure pausing guest threads is what they would want outside the debug menu (though the other devs can comment on that better), and the label options aren't savable right now.

@diegolix29

This comment was marked as abuse.

@diegolix29

This comment was marked as abuse.

@diegolix29

This comment was marked as abuse.

@rainmakerv3
Copy link
Contributor

rainmakerv3 commented Mar 11, 2025

i tested and nothing on the gui is savable actually only the theme

image

all of these things are savable on the main window

this was suggested on my original stop and restart button here image

thats why i added

It's a suggestion, whether it's implemented or not depends on a lot of things. I don't know for certain whether or not this is the case for thread pausing, but a lot of the things that are only in the debug menu and nowhere in the GUI is purposefully done that way so users cannot access it easily. would be good to confirm this with someone more knowledgeable on what the guest thread pausing can effect

@diegolix29

This comment was marked as abuse.

@rainmakerv3
Copy link
Contributor

rainmakerv3 commented Mar 11, 2025

image

i assume this is not intentional, but kinda funny lol. there's also like an unused boolean and function declaration that needs to be removed

@georgemoralis georgemoralis merged commit ae2c9a7 into shadps4-emu:main Mar 26, 2025
12 checks passed
auser1337 pushed a commit to auser1337/shadPS4 that referenced this pull request Mar 27, 2025
…ttons on main window gui (shadps4-emu#2634)

* Adding names to gui buttoms and adjusting spacing.

* moving refresh button to last slot.

* Changing the implementation to tooltips for hover over them - qstring to detect background color.

* Fixing some themes with inverted tooltip base

* Suggestions / Fixes - Pause and FullScreen Buttons

* Update REUSE.toml

* cleaning up

* Icons stuff

* clang

* Buttons toggle - Cleaning code - Fixing Icons

* cleaning boolean

* Toggle pause and play icons and label to "Resume" when paused.

* Simplifying the toggles.

* New icons and final Push to review

* Reuse

* Icon rename, adding f9 press for pause game when no gui is on without needed of debug menu

* clang + reuse

* clang dosent work on this part

* again Clang

* Last fix for review. Light theme white resume icon fix.

* Proper fix for Resume icon

* New Rebase

* Fixed Orientation with docking issues and cleaning boxlayout code

* Adding spacer to separate actions, sizeslider on top of search bar. And adding margins

* Fixed Background not showing on OLED Theme

* Fixing check marks

* Adding all Daniel Suggestions and fixed F9 not working with debug menu open.

* Clang

* reverting all OLED theme changes

* Final suggestions
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.

8 participants