Age | Commit message (Collapse) | Author |
|
Also, make sure that the painter actually draws on a RGB(A) bitmap.
Closes #3460.
|
|
Errors like this became more likely due to the 'optimized' memory usage.
Also, this prevents the WindowServer from being killed by a goofy program
sharing an incomplete bitmap, and likely some other scenarios.
|
|
Indexed bitmaps used to allocate four times the required amount of memory.
Also, we should acknowledge that the underlying data is not always RGBA32,
and instead cast it only when the true type is known.
|
|
In all circumstances, this returned exactly the same thing as scanline_u8(),
so let's just remove the silly detour.
This does not add any new dependency on Bitmap-internals, because that already existed.
|
|
This also touches the return type of dib_size(), because kjdsfg
|
|
|
|
|
|
This will allow us to render check boxes from other places. :^)
|
|
This enum existed both in LibGUI and WindowServer which was silly and
error-prone.
|
|
DC and AC table IDs read in the scan header segment weren't validated
against the IDs of Huffman tables read in the DHT segment. This caused
an OOB read when a Huffman table was accessed using the ID read in the
scan header segment. Furthermore, the decoder now replaces the old DC
or AC table if a redefinition has been found prior to the scan header.
Fixes #3439.
|
|
|
|
Maybe this should do full blending, but for now at least skip source
pixels that have zero alpha.
|
|
|
|
|
|
|
|
|
|
GIFLoader now uses a single frame buffer to cache the last decoded
frame. This drastically reduces memory usage at the small expense of
re-decoding frames on each loop.
|
|
|
|
RestoreBackground disposal mode is now a transparent fill to allow
background to show through.
RestorePrevious disposal mode now restores the previous frame.
|
|
|
|
|
|
Before, we had about these occurrence counts:
COPY: 13 without, 33 with
MOVE: 12 without, 28 with
Clearly, 'with' was the preferred way. However, this introduced double-semicolons
all over the place, and caused some warnings to trigger.
This patch *forces* the usage of a semi-colon when calling the macro,
by removing the semi-colon within the macro. (And thus also gets rid
of the double-semicolon.)
|
|
|
|
|
|
|
|
|
|
GUI::TabWidget has long has a TabPosition::Bottom option, but we still
rendered the tab buttons the same as TabPosition::Top.
This patch implements a custom look for bottom-side tabs. I've done my
best to match the look of the top-side ones, but there might be some
improvements we can make here. :^)
|
|
Don't require theme clients to provide the frame rect, the theme can
compute that internally based on the window rect.
|
|
|
|
|
|
Don't require passing in the outer frame rect since the theme can
compute that itself, based on the window rect.
|
|
|
|
|
|
This avoids a call to clone() which would be discarded immediately.
Also, avoid essentially cloning for each hammer rectangle unless
there is actually a need for it.
|
|
|
|
|
|
|
|
StylePainter should continue to work the same as before.
|
|
StylePainter's behavior is now handled by a static instance
of BaseStylePainter. The original static behavior of StylePainter
is left as-is for API compatibility.
|
|
Fonts following the TypefaceWeightSize naming scheme now associate
with bold weights of the same name and glyph size on construction.
|
|
The SI prefixes "k", "M", "G" mean "10^3", "10^6", "10^9".
The IEC prefixes "Ki", "Mi", "Gi" mean "2^10", "2^20", "2^30".
Let's use the correct name, at least in code.
Only changes the name of the constants, no other behavior change.
|
|
The disposal method on a GIF animation frame now correctly applies to
rendering of the next frame.
|
|
This fixes an issue where transparent pixels in GIF animation frames
have their alpha values incorrectly set to zero, allowing the
background behind the GIF to show through, instead of the previous
animation frame.
Additionally, transparent pixels are now correctly identified based on
their index matching the image transparency index, instead of their
color values.
|
|
This enables a nice warning in case a function becomes dead code.
|
|
|
|
|
|
|
|
This fixes titlebar rects being overly large and leaving smeary
undrawn areas when using a theme with a titlebar height
different to 19px.
|
|
ClassicWindowTheme can now also paint notification window frames.
|
|
This patch introduces the ClassicWindowTheme, which is our default
theme implemented as a Gfx::WindowTheme subclass.
In this initial cut, we move normal window frame painting and title
bar metrics helpers out of WindowServer and into LibGfx.
This will eventually allow us much greater flexibility with theming
windows, and also makes it easier to build applications that want to
render a window with a specific style for some reason. :^)
|