Serenity: DisplayProperties: Highlight current settings

Created on 13 Sep 2019  路  13Comments  路  Source: SerenityOS/serenity

The currently selected wallpaper and resolution should be highlighted somehow in the DisplayProperties window.

Also, there is a lot of unused space in the top half of the DisplayProperties window that should be rid of.

Most helpful comment

Maybe we could use the unused space to show a preview of the wallpaper?

All 13 comments

@Quaker762

Maybe we could use the unused space to show a preview of the wallpaper?

That would be quite handy I suppose.

Maybe we could use the unused space to show a preview of the wallpaper?

This was the idea (hence the empty space) but I'm still working my way around LibGUI and haven't had the time to work out how to squeeze a png/bitmap into a GWidget.

I'll get on fixing it up ASAP :)

The easiest way is to use a GLabel. Combine set_icon() and set_should_stretch_icon() and you've got yourself an image stretcher thingy!

This is partially fixed by 97b7727d5c267a3bc3b3affe4d07ffcbd14c65b1

The wallpaper tab looks better now it has a preview to fill the previously empty space but now it is mismatched with the Settings tab which has the list at the bottom whilst on the Wallpaper tab the list is at the top. It may look better to expand the Settings list to fill the full vertical length of the DP window rather than moving it up and still having a big unused space below.

Alternately, maybe move the Settings list to the top of its tab and then the space below could be used to configure multiple displays when Serenity gets proper GPU drivers?

Hi @Quaker762

The commit message for your latest commit for DisplayProperties says:

The program will now automatically select the user's currently
    chosen resolution when it is loaded up, however it is not
    "visually selected" in the `GListView`

How/where is the current res selected after this commit? This ticket is requesting a visual indicator of the current resolution so it remains open. Appending an asterisk to the end of the currently used resolution and wallpaper would do the trick.

Hey Dan,

How/where is the current res selected after this commit?

https://github.com/SerenityOS/serenity/pull/566/files#diff-28a1b752e336b2447522cd6b3fd98ec7R47

The program automatically detects the resolution as it's specified in WindowManager.ini. GListView currently doesn't support programmatically setting the selected index. I should have some time in the next week to get on it, but kling sounded like he was going to make the changes in IRC the other night.

Appending an asterisk to the end of the currently used resolution and wallpaper would do the trick.

This would work too, however I don't really want to clutter the code up with string modification stuff.

OK, thanks for explaining Jesse!

@danboid can this be closed now? It appears to highlight the current resolution for me now.

Nope. The currently selected res is highlighted now but not the current wallpaper.

Also, there is still a load of unused space at the bottom of the window which looks messy.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

awesomekling picture awesomekling  路  3Comments

xTibor picture xTibor  路  5Comments

danboid picture danboid  路  5Comments

Arthur-Kamau picture Arthur-Kamau  路  7Comments

ZyorYT picture ZyorYT  路  6Comments