Details
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
binaries/data/mods/public/gui/session/top_panel/button_game_speed.xml | ||
---|---|---|
17 ↗ | (On Diff #4309) | AFAIK the height of an item is 25 pixels and there are 11 items, so logical size would be 11*25=275 px, also would it make sense to just set that from js? |
binaries/data/mods/public/gui/session/top_panel/button_game_speed.xml | ||
---|---|---|
17 ↗ | (On Diff #4309) | It doesn't do any harm to go over, so maybe even set = 500 in case more speeds are added later. |
binaries/data/mods/public/gui/session/top_panel/button_game_speed.xml | ||
---|---|---|
17 ↗ | (On Diff #4309) | But that way we get a magical number (it could indeed be set to enything >= 275) everyone forgets about and will bite us again when adding more things or enlarging the item's space. Thus what is against putting it in some init somewhere?, or even better one could make a "hide_scrollbar" tag in the scrollbar xml which never gives a scrollbar when the screen resolution allows to do so. (Probably I am cracking a nutshell with a hammer though) |
I recall some patches increasing the dropdown height just like this and I agree with the diff, so acking that.
bb you can review and commit if you want.
temple if someone added something that could be perceived as a regression, it's not wrong to leave a ping @vladislavbelov
(One also could or could not look for a possibility to reduce the height of the dropdown items while still centering, or implement centering with such a buffer_zone property in source/gui/.)
(XML = set of magic numbers, but if someone wants to set the height of a dropdown in all the relevant dropdowns (civ and biome choices for instance) or even support it in C++, feel free to)
(Having a partial diff for that already, would be rather simple to add such a thing later :P)
I am indeed cracking a nutshell with a hammer, the thing I would propose would be rather easy to implement after D1061, but that doesn't take away that this number can be set to at least 275 or whatever higher. So patch is ok, whether we make another xml entry or not could be done later if we consider it useful.
I've to notice, that the problem was only for replays. Because a usual game has less number of speed types.