aboutsummaryrefslogtreecommitdiff
path: root/gui/ThemeEngine.cpp
AgeCommit message (Collapse)Author
2018-03-12GUI: Remove the ThemeItem draw queuesBastien Bouclet
Drawing nows happens directly when the Dialog or Widget draw methods are called. This makes it easy to debug why a particular low level draw method was called, by inspecting the call stack. This replaces the notion of "buffering" by two independant ways to control what is drawn and where: - The active layer is used to select whether the foreground or background part of the dialogs are rendered by the draw calls. - The active surface is used to select if the draw calls affect the back buffer or the screen. The foreground layer of the active dialog is drawn directly to the screen. Its background layer is drawn to the back buffer. This way widgets can restore the back buffer in order to update without having to redraw the dialog's background. Dialogs lower in the dialog stack are drawn entirely to the back buffer.
2018-01-27GUI: Remove the parent from the button_idle DrawDataBastien Bouclet
Removing it does not result in any visible difference. It was likeliy set by mistake.
2017-08-06GUI: Mark some fall-through cases as intentionalBastien Bouclet
Comments explain how the num lock handling works before the fall-through cases.
2017-06-20GUI: Separate bevel and shadow effect when extending widget rectThierry Crozat
When widget::draw() is called it asks the ThemeEngine to redraw the background first and then the widget gets redrawn in drawWidget(). The ThemeEngine uses an extended rect to restore the background to include bevel and shadow effects. However if this extended rect overlaps with other widgets, since those other widgets are not redrawn, a part of those will be missing. See for example bug #6394: GUI: List View save page drawns over font. In case we get overlap we might need to change the way widgets are drawn so that all widgets intersecting the area where the backgroud is restored are redrawn. This commit simply seperate the bevel and shadow effects, and uses the shadow offset only to extend the bottom and right sides of the rectangle (while the bevel offset is still used to extend all four sides). This results in a smaller extended rectangle (if the shadow offset is bigger than the bevel offset, which is the case of the list view) and thus decrease the risk of the issue happening. The particular cases described in bug #6394 are all fixed with this change.
2017-04-06GUI: Restore settings if GUI cannot be renderedJoseph-Eugene Winzer
PR#921 changes the behavior of the client that if the GUI fails to be rendered the previously applied settings in the misc category are restored. Error messages were altered according to the changes. Bug: #9717 GUI: Indirectly changing 'GUI Language' can produce inconsistent behaviour when changing some options.
2017-03-09GUI: Fix resolution of theme filename to idJoseph-Eugene Winzer
getThemeId() returned "builtin" for valid filenames because FSNode only searches for the theme filename, like "scummmodern.zip" in the current directory. listUsableThemes() searches SearchMan default directories for theme files.
2017-02-28GUI: Check rect validity for popup/radio drawingWillem Jan Palenstijn
2017-02-28GUI: Give each tab in TabWidget its own widthWillem Jan Palenstijn
The width of each tab is now computed from its title, independently of the other tabs. This increases the number of tabs that fit on the screen. This rewrite also fixes a bug where if the window size increased while _firstVisibleTab > 0, some tabs would become inaccessible when the scroll buttons were hidden. The layout key Globals.TabWidget.Tab.Width is now treated as minimal tab width. This is set so that the tabs fit reasonably well in lowres layouts. At the same time, this reduces the lowres scroll buttons heights to fit. This patch makes the Nintento DS hacks in TabWidget obsolete. (Hopefully! I'm not able to test.)
2017-01-12GUI: Fix Unused Variable Compiler Warning when USE_PNG not set.D G Turner
2016-08-24GUI: Add Storage providers logosAlexander Tkachev
StorageWizardDialog now shows logo of the Storage being connected (in modern highres theme).
2016-08-24GUI: Add "Paste" button in StorageWizardDialogAlexander Tkachev
It pastes clipboard contents as code into 8 fields of that dialog. (Clipboard support works with SDL2 only.) "Open URL" and "Paste" buttons are placed in the left column under the picture (because there is no room for 4 buttons in the bottom row). Commit also adds "dropbox.bmp", which is just a square 115x115 picture. Such pictures are would be used as Storages logos in that dialog. In lowres there is no left column, so all 4 buttons are in the same row. None of them are visible, because they are overflowed. Container has to be added to continue working on them.
2016-08-24GUI: Fix warningsEugene Sandulenko
2016-08-24GUI: Fix texts clippingAlexander Tkachev
If it was completely clipped out (empty rectangle), it was drawing the whole text ("empty means no clipping"), so I had to detect such cases and change textArea to one small pixel.
2016-08-24GUI: Added transparency to PicWidgetsEugene Sandulenko
2016-08-24GUI: Added empty dialog backgroundEugene Sandulenko
2016-08-24GUI: Added possibility to specify scale mode for AlphaBitmapsEugene Sandulenko
2016-08-24GUI: Implemented more modes to autoscaleEugene Sandulenko
2016-08-24GUI: Implemented alphabitmap autoscaleEugene Sandulenko
2016-08-24GUI: Implemented possibility to use alphabitmaps in GraphicsWidgetEugene Sandulenko
2016-08-24GUI: Added new alphabitmap image typeEugene Sandulenko
2016-08-24GUI: Added support for PNG imagesEugene Sandulenko
2016-07-03JANITORIAL: Remove trailing spacesAlexander Tkachev
2016-07-03GUI: Use clipping everywhereAlexander Tkachev
2016-07-03GUI: Fix blitAlphaBitmapClip()Alexander Tkachev
2016-07-03GUI: Add blipClip()Alexander Tkachev
2016-07-03GUI: Add drawTabClip()Alexander Tkachev
2016-07-03GUI: Add drawSquareClip()Alexander Tkachev
2016-07-03GUI: Add VectorRendererSpec::drawTriangleClip()Alexander Tkachev
2016-07-03GUI: Fix ThemeItemTextData's dirty rectangleAlexander Tkachev
2016-07-03GUI: Make PopUpWidget clipAlexander Tkachev
2016-07-03GUI: drawRoundedSquareClip()Alexander Tkachev
2016-07-03GUI: clippingRect propagated deeperAlexander Tkachev
2016-07-03GUI: Prepare button to be clippedAlexander Tkachev
2016-07-03GUI: Add ScrollContainerAlexander Tkachev
2016-07-03GUI: Use boss's x/y/w/h instead of clippingAreaAlexander Tkachev
2016-06-06GUI: Fix regressionEugene Sandulenko
2016-06-06GUI: Fixed negative index checkEugene Sandulenko
2016-06-05GUI: Prevent potential negative index accessEugene Sandulenko
2016-06-05GUI: Fix possible negative index accessEugene Sandulenko
2016-06-01GRAPHICS: Restore layout debugging capabilitiesEugene Sandulenko
2016-06-01GUI: More object initialization cleanupEugene Sandulenko
2016-03-23GUI: Fix constant names mentioned in commentOri Avtalion
2016-01-24GUI: Fix pointer formatting in ThemeEngine.cpp.Johannes Schickel
2016-01-24GUI: Use "button" instead of "btn" in variable names.Johannes Schickel
2015-12-21GRAPHICS: Introduce a size mode for TrueType fontsBastien Bouclet
Allows to match Windows font size selection by converting font heights to point sizes using the TrueType tables.
2015-11-09GUI: Use after freeBertrand Augereau
2015-11-09GUI: strncat needs a destination C-stringBertrand Augereau
2015-11-07GUI: Removed 64k limit on built-in theme XML sizeEugene Sandulenko
2014-06-09GRAPHICS: Allow client code to specify TTF render mode.Johannes Schickel
This allows clients to use the default FreeType2 render mode instead of light. We really only use light as default because that's what looks best with the font we use in our GUI right now (which is the same reason why formerly light was always used in non-monochrome mode).
2014-02-28IMAGE: Move all ImageDecoders to image/Matthew Hoops