summaryrefslogtreecommitdiff
path: root/Libraries
AgeCommit message (Collapse)Author
2019-12-24LibGUI: Use ColorRole::BaseText for the GCheckBox checkmarkAndreas Kling
2019-12-24LibDraw: Teach progress bar painting about palettesAndreas Kling
2019-12-24LibDraw: Add ColorRole::BaseText (to be painted on ColorRole::Base)Andreas Kling
2019-12-24LibGUI+LibDraw: Add "Palette" concept for scoped color themingAndreas Kling
GApplication now has a palette. This palette contains all the system theme colors by default, and is inherited by a new top-level GWidget. New child widgets inherit their parents palette. It is possible to override the GApplication palette, and the palette of any GWidget. The Palette object contains a bunch of colors, each corresponding to a ColorRole. Each role has a convenience getter as well. Each GWidget now has a background_role() and foreground_role(), which are then looked up in their current palette when painting. This means that you no longer alter the background color of a widget by setting it directly, rather you alter either its background role, or the widget's palette.
2019-12-24LibDraw: Add Selection and SelectionText system theme colorsAndreas Kling
2019-12-24LibDraw: Use SystemColor::ThreedHighlight everywhere in StylePainterAndreas Kling
2019-12-24LibGUI: Respect more theme colors in GTextEditorAndreas Kling
2019-12-24LibGUI: Respect more system theme colors in GToolBarAndreas Kling
2019-12-24LibGUI: More system theme support in GTabWidget and GTableViewAndreas Kling
2019-12-24LibDraw: Give Color::lightened() an amount argumentAndreas Kling
2019-12-24LibDraw: Add Button and ButtonText system theme colorsAndreas Kling
These are now separate from the Window and WindowText colors.
2019-12-24LibGUI: Use SystemColor::Text in more placesAndreas Kling
2019-12-24LibGUI: Paint GResizeCorner with SystemColor::Window backgroundAndreas Kling
2019-12-23WindowServer+LibGUI: Implement basic color themingAndreas Kling
Color themes are loaded from .ini files in /res/themes/ The theme can be switched from the "Themes" section in the system menu. The basic mechanism is that WindowServer broadcasts a SharedBuffer with all of the color values of the current theme. Clients receive this with the response to their initial WindowServer::Greet handshake. When the theme is changed, WindowServer tells everyone by sending out an UpdateSystemTheme message with a new SharedBuffer to use. This does feel somewhat bloated somehow, but I'm sure we can iterate on it over time and improve things. To get one of the theme colors, use the Color(SystemColor) constructor: painter.fill_rect(rect, SystemColor::HoverHighlight); Some things don't work 100% right without a reboot. Specifically, when constructing a GWidget, it will set its own background and foreground colors based on the current SystemColor::Window and SystemColor::Text. The widget is then stuck with these values, and they don't update on system theme change, only on app restart. All in all though, this is pretty cool. Merry Christmas! :^)
2019-12-23LibDraw: Parse all CSS standardised color keywordsShannon Booth
2019-12-23LibGUI: Activate GTreeView indexes when double clicking leaf nodesAndreas Kling
This seems pretty sensible to me. I'm unsure if we should activate nodes that have children, or just toggle them.
2019-12-22LibPthread: Okay I'm dumb, let's convert mutex locks into Atomic<u32>&Andreas Kling
2019-12-22LibPthread: Fix typo in pthread_mutex_lock()Andreas Kling
We were casting the pthread_mutex_t* instead of pthread_mutex_t::lock to an Atomic<u32>. This still worked fine, since "lock" is the first member of pthread_mutex_t.
2019-12-22LibPthread+LibC: Support PTHREAD_MUTEX_RECURSIVEAndreas Kling
This allows SDL to build against our native recursive mutex instead of providing its own. Also it's just a nice feature to have. :^)
2019-12-22LibC: Prevent assertions in malloc/free at exit timeAndrew Kaster
This is a bit sad, but, with the Allocators as static globals their destructors were running before some user code. Which doesn't really make much sense, as none of the members of (at least the basic one) do any real heavy lifting or have many resources to RAII. To avoid the problem, just mmap the memory for the global arrays of Allocators in __malloc_init and let the Kernel collect the memory when we're done with the process.
2019-12-22LibGUI: Don't assert in ~GWidgetClassRegistrationAndrew Kaster
These guys are all declared as globals, and their ASSERT_NOT_REACHED in the destructor doesn't play nice with __cxa_atexit. As in, every application will assert in __cxa_finalize if this assert isn't removed.
2019-12-22LibC: Support exit time destructors per the Itanium C++ ABIAndrew Kaster
Implement __cxa_atexit and __cxa_finalize per the Itanium spec, and convert stdlib's atexit and exit() to to call them instead of a custom 'C-only' atexit implementation.
2019-12-20LibC: Always install as part of the default targetAndreas Kling
We always want to put crt0.o in the location where it can get picked up by the i686-pc-serenity toolchain. This feels a bit hackish but should get the build working again. :^)
2019-12-20Kernel+LibC: Build with basic -fstack-protector supportAndreas Kling
Use simple stack cookies to try to provoke an assertion failure on stack overflow. This is far from perfect, since we use a constant cookie instead of generating a random one on startup, but it can still help us catch bugs, which is the primary concern right now. :^)
2019-12-20LibC: Make sure we build crt0.oAndreas Kling
2019-12-20Build: clean up build system, use one shared Makefilejoshua stein
Allow everything to be built from the top level directory with just 'make', cleaned with 'make clean', and installed with 'make install'. Also support these in any particular subdirectory. Specifying 'make VERBOSE=1' will print each ld/g++/etc. command as it runs. Kernel and early host tools (IPCCompiler, etc.) are built as object.host.o so that they don't conflict with other things built with the cross-compiler.
2019-12-20LibC: Make empty malloc blocks purgeableSergey Bugaev
2019-12-20WindowServer+LibGUI: Add data_type and data fields to drag operationsAndreas Kling
These fields are intended to carry the real meat of a drag operation, and the "text" is just for what we show on screen (alongside the cursor during the actual drag.) The data field is just a String for now, but in the future we should make it something more flexible.
2019-12-20LibGUI: GWidget::drop_event() should ignore the event by defaultAndreas Kling
This will cause the event to bubble up the widget tree.
2019-12-18LibHTML: Ignore layout repaints outside the visible viewportAndreas Kling
Now that Frame knows the visible viewport rect, it can easily ignore repaint requests from e.g <blink> elements that are not currently scrolled into view. :^)
2019-12-18LibHTML: Add TreeNode::for_each_in_subtree_of_type<T>()Andreas Kling
This allows you to iterate a subtree and get a callback for every node where is<T>(node) == true. This makes for quite pleasant DOM traversal.
2019-12-18LibHTML: Mark image bitmaps outside the visible viewport as volatileAndreas Kling
When the visible viewport rect changes, we walk the layout tree and check where each LayoutImage is in relation to the viewport rect. Images outside have their bitmaps marked as volatile. Note that the bitmaps are managed by ImageDecoder objects. If a bitmap is purged by the kernel while volatile, we construct a new ImageDecoder next time we need pixels for the image.
2019-12-18LibHTML: Push the visible viewport rect from HtmlView to FrameAndreas Kling
This will allow various mechanisms and optimizations based on the currently visible viewport rect.
2019-12-18LibHTML: Add LayoutNode::is_image() and is<LayoutImage> helperAndreas Kling
2019-12-18LibDraw: Create purgeable GraphicsBitmap in the PNG decoderAndreas Kling
Also add ImageDecoder APIs for controlling the volatile flag.
2019-12-18LibDraw: Add GraphicsBitmap::create_purgeable()Andreas Kling
This allows you to create a process-private purgeable GraphicsBitmap. The volatile flag is controlled via set_volatile() / set_nonvolatile().
2019-12-18Kernel: Add MADV_GET_VOLATILE for checking the volatile flagAndreas Kling
Sometimes you might want to know if a purgeable region is volatile.
2019-12-18LibC: Store empty malloc blocks in an array instead of a linked listSergey Bugaev
2019-12-18LibHTML: Insert a new linebox for every newline in "white-space: pre"Andreas Kling
2019-12-18LibHTML: Ignore case of presentation attribute namesAndreas Kling
2019-12-18LibHTML: Don't insert line breaks between multiple <pre>'s on a lineAndreas Kling
When iterating lines for "white-space: pre", we should only break when there is an actual line break character.
2019-12-18LibHTML: Let's display <basefont> as block-level elements for nowAndreas Kling
2019-12-18LibHTML: Use a fixed-width font for <pre> tags, duh!Andreas Kling
2019-12-17GTextEditor: Fix broken rendering of selection on wrapped linesAndreas Kling
This logic broke when converting String::length() to return size_t.
2019-12-16LibHTML: Support the :only-child pseudo classAndreas Kling
2019-12-16LibHTML: Support the :empty pseudo classAndreas Kling
2019-12-16LibDraw: Parse the color name "pink" to #ffc0cbAndreas Kling
2019-12-16LibHTML: Support the :first-child and :last-child pseudo classesAndreas Kling
2019-12-16LibGUI: Fix GTreeView crash on pressing Left/Right without selectionAndreas Kling
2019-12-16LibIPC: Make sure we always process unhandled messagesAndreas Kling
A client that only ever does synchronous IPC calls from its side would never actually process incoming asynchronous messages since they would arrive while waiting for a synchronous response and then end up sitting forever in the "unhandled messages" queue. We now always handle unhandled messages using a deferred invocation. This fixes the bug where Audio.MenuApplet didn't learn that the muted state changed in response to its own request to change it. :^)