Use a smaller font size for theme UI buttons
The impact of increasing button sizes on the top bar and replay UI is a bit worse than expected and I can't be bothered to deal with the consequences at this time.
This commit is contained in:
parent
8094f8c245
commit
d3de899186
4 changed files with 5 additions and 4 deletions
|
@ -55,7 +55,7 @@
|
|||
* Fixed the turn timer/system clock display on the top bar incorrectly using a larger font size at small resolutions.
|
||||
* Made the Defense display label on the sidebar visible (a side-effect of replacing SDL_ttf) and rearranged it slightly.
|
||||
* Set the correct default text color for in-game UI elements instead of #ffffff white for consistency with other UI elements.
|
||||
* Increased font sizes in Help and some legacy UI elements including in-game menu and End Turn buttons.
|
||||
* Increased font sizes in Help and some legacy UI elements.
|
||||
### WML Engine
|
||||
* Standard Location Filters now support gives_income=yes|no to make it simpler to match villages regardless of owner
|
||||
* Fixed ThemeWML `[label] font_rgb=` generating text elements with broken UTF-8 sequences.
|
||||
|
|
|
@ -883,7 +883,7 @@ void display::create_buttons()
|
|||
if (!menu.is_button()) continue;
|
||||
|
||||
std::shared_ptr<gui::button> b(new gui::button(screen_, menu.title(), gui::button::TYPE_PRESS, menu.image(),
|
||||
gui::button::DEFAULT_SPACE, false, menu.overlay()));
|
||||
gui::button::DEFAULT_SPACE, false, menu.overlay(), font::SIZE_BUTTON_SMALL));
|
||||
DBG_DP << "drawing button " << menu.get_id() << "\n";
|
||||
b->join_same(this);
|
||||
b->set_id(menu.get_id());
|
||||
|
@ -902,7 +902,7 @@ void display::create_buttons()
|
|||
DBG_DP << "creating action buttons...\n";
|
||||
for(const auto& action : theme_.actions()) {
|
||||
std::shared_ptr<gui::button> b(new gui::button(screen_, action.title(), string_to_button_type(action.type()), action.image(),
|
||||
gui::button::DEFAULT_SPACE, false, action.overlay()));
|
||||
gui::button::DEFAULT_SPACE, false, action.overlay(), font::SIZE_BUTTON_SMALL));
|
||||
|
||||
DBG_DP << "drawing button " << action.get_id() << "\n";
|
||||
b->set_id(action.get_id());
|
||||
|
|
|
@ -22,6 +22,7 @@ const int
|
|||
SIZE_TINY = 13 * (SIZE_NORMAL / 17),
|
||||
SIZE_SMALL = 15 * (SIZE_NORMAL / 17),
|
||||
SIZE_BUTTON = 16 * (SIZE_NORMAL / 17),
|
||||
SIZE_BUTTON_SMALL = 14 * (SIZE_NORMAL / 17),
|
||||
|
||||
SIZE_15 = 15 * (SIZE_NORMAL / 17),
|
||||
SIZE_PLUS = 18 * (SIZE_NORMAL / 17),
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace font {
|
|||
// font sizes, to be made theme parameters
|
||||
extern const int SIZE_NORMAL;
|
||||
// automatic computation of other font sizes, to be made a default for theme-provided values
|
||||
extern const int SIZE_TINY, SIZE_SMALL, SIZE_BUTTON,
|
||||
extern const int SIZE_TINY, SIZE_SMALL, SIZE_BUTTON, SIZE_BUTTON_SMALL,
|
||||
SIZE_15, SIZE_PLUS, SIZE_LARGE, SIZE_TITLE, SIZE_FLOAT_LABEL, SIZE_XLARGE;
|
||||
|
||||
// For arbitrary scaling:
|
||||
|
|
Loading…
Add table
Reference in a new issue