Skip to content

Conversation

eafton
Copy link
Contributor

@eafton eafton commented Jun 24, 2025

This patch adds an icon (warning, icon, information) to message boxes on the X11 backend.

@eafton eafton marked this pull request as draft June 24, 2025 01:55
@slouken slouken added this to the 3.x milestone Jun 24, 2025
@eafton eafton changed the title Add message box icons on X11. Restyle message boxes and add icon support to them on X11. Jul 6, 2025
@eafton eafton marked this pull request as ready for review July 6, 2025 17:55
@eafton
Copy link
Contributor Author

eafton commented Jul 6, 2025

I have decided to redo the positioning/styling code, any opinions?
Screenshot at 2025-07-06 20-57-38
Screenshot at 2025-07-06 20-57-49
Screenshot at 2025-07-06 20-57-53

@slouken slouken modified the milestones: 3.x, 3.4.0 Jul 11, 2025
@slouken slouken requested a review from icculus July 11, 2025 19:20
@slouken
Copy link
Collaborator

slouken commented Jul 11, 2025

I have decided to redo the positioning/styling code, any opinions? Screenshot at 2025-07-06 20-57-38 Screenshot at 2025-07-06 20-57-49 Screenshot at 2025-07-06 20-57-53

This doesn't add much visual style. Maybe we should use an icon circle background with colors to indicate severity? This more closely matches other platforms.

@eafton
Copy link
Contributor Author

eafton commented Jul 11, 2025

I have decided to redo the positioning/styling code, any opinions? Screenshot at 2025-07-06 20-57-38 Screenshot at 2025-07-06 20-57-49 Screenshot at 2025-07-06 20-57-53

This doesn't add much visual style. Maybe we should use an icon circle background with colors to indicate severity? This more closely matches other platforms.

I am looking into it.

@eafton eafton force-pushed the x11messagebox-icons branch from 704a790 to 2c8c04e Compare July 11, 2025 19:39
@eafton
Copy link
Contributor Author

eafton commented Jul 11, 2025

I implemented the suggested changes and switched to a circle background, thoughts?
screenshot

@slouken
Copy link
Collaborator

slouken commented Jul 11, 2025

It doesn't look great to me. Maybe it makes sense to build in actual icons?

@eafton
Copy link
Contributor Author

eafton commented Jul 11, 2025

It doesn't look great to me. Maybe it makes sense to build in actual icons?

What about using coloring the icons in with blue, red, yellow, etc and drawing an outline?

@eafton
Copy link
Contributor Author

eafton commented Jul 11, 2025

It doesn't look great to me. Maybe it makes sense to build in actual icons?

image Is this any better? I think it wouldnt be bad if we used a light color scheme for the widgets.

@eafton
Copy link
Contributor Author

eafton commented Jul 11, 2025

It doesn't look great to me. Maybe it makes sense to build in actual icons?

image

What about this?

@slouken
Copy link
Collaborator

slouken commented Jul 11, 2025

It doesn't look great to me. Maybe it makes sense to build in actual icons?

image What about this?

That's not bad. Can you check other platforms to see what their icons look like? It might be worth checking zenity, as that's closer to what people would expect on Linux.

@eafton
Copy link
Contributor Author

eafton commented Jul 11, 2025

That's not bad. Can you check other platforms to see what their icons look like? It might be worth checking zenity, as that's closer to what people would expect on Linux.

After checking, I decided to add a small shadow to the icon for increasing contrast, opinions?
image
image
image

@eafton
Copy link
Contributor Author

eafton commented Jul 13, 2025

@slouken I decided to tweak the palette some more and bevelling to the buttons, thoughts?
a
a2
a3

@slouken
Copy link
Collaborator

slouken commented Jul 14, 2025

This seems fine. @icculus, thoughts?

@eafton
Copy link
Contributor Author

eafton commented Jul 23, 2025

Sorry to barge in, but I have been working on a fork where all of the window and widget code form the messagebox implementation is moved into a built in toolkit so those functions can be reused in a UNIX non-zenity/non-portal dialog implementation, should I work on that or keep this open?

@eafton
Copy link
Contributor Author

eafton commented Jul 27, 2025

Sorry to barge in, but I have been working on a fork where all of the window and widget code form the messagebox implementation is moved into a built in toolkit so those functions can be reused in a UNIX non-zenity/non-portal dialog implementation, should I work on that or keep this open?

Thoughts? eafton@1b9eb9d

@eafton eafton closed this Jul 27, 2025
@eafton eafton reopened this Jul 27, 2025
@slouken
Copy link
Collaborator

slouken commented Jul 28, 2025

I'll go ahead and merge this. We can tweak the styling for 3.4.0 release. Thanks for your work on this!

@slouken slouken merged commit d983a89 into libsdl-org:main Jul 28, 2025
82 checks passed
@eafton
Copy link
Contributor Author

eafton commented Jul 28, 2025

I'll go ahead and merge this. We can tweak the styling for 3.4.0 release. Thanks for your work on this!

@slouken No problem! One last thing, should I work on the "toolkit" mentioned above or not?

@eafton eafton deleted the x11messagebox-icons branch July 28, 2025 16:25
@slouken
Copy link
Collaborator

slouken commented Jul 28, 2025

I'll go ahead and merge this. We can tweak the styling for 3.4.0 release. Thanks for your work on this!

@slouken No problem! One last thing, should I work on the "toolkit" mentioned above or not?

It's up to you. I don't think it's something SDL would use, we try to minimize system dependencies where possible.

@eafton
Copy link
Contributor Author

eafton commented Jul 28, 2025

I'll go ahead and merge this. We can tweak the styling for 3.4.0 release. Thanks for your work on this!

@slouken No problem! One last thing, should I work on the "toolkit" mentioned above or not?

It's up to you. I don't think it's something SDL would use, we try to minimize system dependencies where

I'll go ahead and merge this. We can tweak the styling for 3.4.0 release. Thanks for your work on this!

@slouken No problem! One last thing, should I work on the "toolkit" mentioned above or not?

It's up to you. I don't think it's something SDL would use, we try to minimize system dependencies where possible.

Its all internal to SDL, you can check the branch I sent earlier, I split out the code so it can be reused in a dialog subsystem implementation, I also ported messageboxes to it and it seems to work fine.

@slouken
Copy link
Collaborator

slouken commented Jul 28, 2025

Oh, I see. Feel free to create a PR for this, sure. I don't know whether it makes sense to use for dialogs, but it doesn't hurt to refactor and clean up the messagebox code.

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.

2 participants