This makes it so the grid and its children are only displayed when the
client has mod access to the sever, rather than keeping them visible at
all times and graying them out when not available.
This replaces the page number slider with a "minimal" variant slider and
an adjacent label widget whose text we enter manually.
The label format is "<PAGE>/<COUNT>" and it's untranslatable. Hopefully
this shouldn't cause any localization issues since it's all numbers and
we currently can't use alternative numeral systems anyway.
I'm leaving the page slider's maximum_value_label attribute intact just
in case this needs to be reverted later, since it's going into the 1.12
branch too.
The default variant's text label is both inflexible in content (can't
customize the format for non-edge values) and layout (reserves way more
space than it needs at a time for its text label, often resulting in
huge horizontal gaps between a slider and an adjacent widget). This
makes it unsuitable for use in gui2::tchat_log.
This new minimal variant will be wired into gui2::tchat_log next.
This copies the current contents of the dialog to clipboard. The button
currently lacks a tooltip because the tooltip has the potential to cause
map labels to glitch through the dialog when displayed (see commit
eab3e6fb64 and bug #22176).
(The tooltip should also remain commented-out because this is a backport
to 1.12.)
This copies the contents of the main display area to clipboard. The
button currently lacks a tooltip because the tooltip causes map labels
to glitch through the dialog when displayed (noticeable in e.g. the test
scenario). I'll file a bug for this issue later using a (commented-out)
line introduced by this commit as a test case.
It includes the following features:
* A cleaner and more structured message display
* Buttons to copy the screenshot file path to clipboard or open it with
an external application defined by the platform
* An additional button to browse to the screenshots folder using an
external file manager defined by the platform
It also breaks the scons build. This will be addressed by the next
commit.
... by making it not transparent.
For some reason, on Linux the antialiasing of the textbox text contents
looks slightly off when the background is a transparent (a != 255)
color. This does not happen when a solid color (a == 255) is used
instead.
Since Cairo AA is broken horribly with ClearType on Windows atm I'm not
really sure this specific bug also happens there.
To keep the intended effect of ebc214ff12,
I took a couple of screenshots of the textbox widget in both its enabled
and disabled states and averaged the background colors with the GIMP to
get an approximation of the result of blending the transparent overlay
from the GUI__BACKGROUND_COLOR_* macros with the standard dialog
background.
Adds a new 'description' attribute to [theme] and replaces the previous
instance of gui2::tsimple_item_selector used to select themes with a
brand new dialog (that's actually based on it) that allows for
displaying theme descriptions in a nice format.
Because some of the theme names aren't obvious enough to players
("UnitBox" comes to mind), we ought to provide descriptions of each
theme to save people some clicks since it's not possible at the
moment to switch the theme mid-game and see the results immediately.
Note that this widget lacked a background before, making it look like
a simple label with a border and caret. In my opinion, the subtle
background is an improvement that highlights the widget's "dynamicness",
and makes it more obvious when it is disabled.
Turns out there already was a somewhat more elegant solution in use for
the GUI2 lobby and macroified for everyone else. It uses a
stacked_widget with a spacer within instead of the awkward 2x2
{[central widget,spacer],[spacer,spacer]} grid we were using here.
Replace the definition of GUI__BACKGROUND_COLOR_ENABLED (used by the
"listbox_text" and "listbox_text_with_icon" variations of
ttoggle_button, and the default ttoggle_panel variation) so that it
matches the gui::menu::bluebg_style GUI1 menu style definition in
src/widgets/menu_style.cpp:29.
These controls are commonly used with gui2::tlistbox, so this change is
intended to make GUI2 listboxes in general have the same overall
appearance as GUI1 menus after the dialog background graphics were
replaced as part of the UI overhaul in 1.11.x.
The previous background definition for these GUI2 widgets was a solid
color, rgb(21, 19, 19), meaning that they necessarily wouldn't match
the standard bluebg_style GUI1 menu style, which uses rgba(0, 0, 0,
0.35).
Alpha 255 * 0.35 = 89.25, hence the new definition of
GUI__BACKGROUND_COLOR_ENABLED has an alpha channel value of 89 and not a
multiply of 10 or 2 like 90.
Shadowm figured out why blurring didn't work properly in the title screen
and created a proof-of-concept patch. This patch is heavily based upon
that patch.
Because this window many contain a lot of text in both directions,
having it change size dynamically every time the log page is switched or
a new text filter is entered can be extremely annoying for the player.
Setting the scroll_label's parent (now ancestor) cell's minimum size to
something that isn't 0x0 mitigates the issue to some extent. Better than
nothing, I guess.
(Tested with a screen resolution of 800x480.)
Since the GUI2 titlescreen took over, the path to tips.cfg is not
hard-coded in the engine anymore; in fact, this commit also updates that
path, which is in data/gui/default.cfg.
This allows us to be more self-contained and require less logic in the
instantiation site for preparing the report for display.
This requires adding a new row and label for displaying the list of
faulty files, which will be hidden when the list is empty or not
provided in the display() static member function.
This dialog features separate summary and detail sections along with a
small heading for the latter in bold face. More features may be added
later as part of my work on improving WML diagnostics, but for now we
have the bare minimum for better message formatting with a content
structure more or less identical to the current one.
The placement of tooltip is controlled by the WML of the GUI engine. The
code is not used yet, only available with a proof-of-concept define named
DEBUG_TOOLTIP.
The URL controls overlay a placeholder "None" label using the
[stacked_widget]. When there's no URL to show, the URL controls are
hidden. When there is a URL to show, the placeholder is hidden instead.
Fixes the description box and header being centered on the dialog when
the description box and/or its container grid are narrower than the
column containing them.
The new layout merges some information rows together to increase
available vertical space for displaying additional fields later, and
uses a 'description' scroll_label type for the add-on Description field
to improve its appearance, especially for multi-line descriptions.
This also makes the dialog non-click-dismissable and adds a Close button
on the bottom right corner. Since we're about to add more interactive
controls, there's really not much of a choice about the click-dismiss
option; it gets disabled for such dialogs automatically.