summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/TabWidget.cpp
AgeCommit message (Collapse)Author
2020-12-29LibGUI: Move REGISTER_WIDGET(GUI, TabWidget) to Widget.cppLinus Groh
All the other (GUI) registrations happen here, so it's confusing to have just one elsewhere ("wait... is TabWidget not registered?!").
2020-10-30LibGUI: Add Widget::has_focus_within()Andreas Kling
This returns true if the widget has focus, or if one of its descendant widgets does. Use this in StackWidget and TabWidget. This also fixes HackStudio crashing on startup in StackWidget, due to running before the window has a focused widget.
2020-10-30LibGUI: Improve TabWidget+StackWidget focus behavior furtherAndreas Kling
When setting a new active widget, transfer focus if it's anywhere in the old active widget's tree, not just at the immediate child.
2020-10-30LibGUI: Make TabWidget unfocusable when tab-lessAndreas Kling
If there are no tab buttons or tab children, don't participate in the focus chain.
2020-10-30LibGUI: Make StackWidget/TabWidget preserve focus in inactive windowsAndreas Kling
This one is a bit sketchy. While a window is inactive, none of its widgets are considered focused (Widget::is_focused() will return false) but this caused programmatic changes of the active widget in a tab or stack widget to fail focus propagation from old child to new child. Work around this by checking against Window::focused_widget() directly instead of asking Widget::is_focused().
2020-10-30LibGUI: Make TabWidget focusable and allow left/right arrow tab switchAndreas Kling
You can now focus a TabWidget by tabbing (with the keyboard!) to it. Once focused, you can switch the active tab by pressing the left/right keyboard keys.
2020-10-30LibGUI: TabWidget should not steal focus on programmatic tab switchAndreas Kling
This matches the behavior of GUI::StackWidget.
2020-09-15LibCore: Make Core::Object properties more dynamicAndreas Kling
Instead of everyone overriding save_to() and set_property() and doing a pretty asymmetric job of implementing the various properties, let's add a bit of structure here. Object properties are now represented by a Core::Property. Properties are registered with a getter and setter (optional) in constructors. I've added some convenience macros for creating and registering properties, but this does still feel a bit bulky. We'll have to iterate on this and see where it goes.
2020-09-14LibGfx+LibGUI: Allow setting tab text alignment with set_property()Andreas Kling
2020-09-14LibGUI: Add TabWidget::set_property() and handle some propertiesAndreas Kling
2020-09-14LibGUI: Add registration for GUI::TabWidgetAndreas Kling
2020-08-24LibGUI: Fix an unsightly pixel glitch in bottom-side tabsAndreas Kling
2020-08-23LibGUI+LibGfx: Implement upside-down appearance for bottom-side tabsAndreas Kling
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. :^)
2020-07-26LibCore+LibGUI: Switch to using AK::is and AK::downcastAndreas Kling
2020-06-10LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSizeAndreas Kling
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much better visual clue about what type of metric is being used.
2020-05-21LibGUI: Add hook when a context menu is requested on a tabFalseHonesty
2020-05-19LibGUI: Add ability to hide GUI::TabWidget's tab barLinus Groh
2020-05-09LibGUI: Add hook when a tab is middle clickedFalseHonesty
2020-04-30LibGUI: Scale TabWidget tabs according to available spaceAndreas Kling
In TabWidgets with the "uniform tabs" mode on, we will now scale tabs between a minimum and maximum size, distributing the available space. Partially addresses #1971.
2020-04-30LibGUI: Cycle through TabWidget tabs with Ctrl+Tab / Ctrl+Shift+TabAndreas Kling
Fixes #2022.
2020-04-26Revert "LibGUI: Use bold font for the currently active TabWidget tab"Andreas Kling
This reverts commit 4d8206f7c27e1c235104143a76fe5ed64ffcbac3. This was not visually pleasant. We'll have to come up with some better way to distinguish the active tab in Browser.
2020-04-24LibGUI: Tweak TabWidget tab icon placementAndreas Kling
2020-04-24LibGUI: Use bold font for the currently active TabWidget tabAndreas Kling
2020-04-24LibGUI: Add "uniform tabs" mode to TabWidget (all tabs have same width)Andreas Kling
...and enable this in the main Browser UI. :^)
2020-04-24LibGUI: Allow TabWidget tabs to have icons and custom text alignmentAndreas Kling
2020-04-24LibGUI: Allow overriding the padding inside a TabWidgetAndreas Kling
2020-04-24LibGUI: When removing a TabWidget tab, activate the next tabAndreas Kling
2020-04-24LibGUI: Grant focus when activating a new stack/tab child widgetAndreas Kling
This makes opening a tab actually focus the opened tab.
2020-04-23LibGUI: Add TabWidget functions to activate next/previous tabAndreas Kling
2020-04-23LibGUI: Add TabWidget::set_tab_title(Widget&, StringView)Andreas Kling
This lets you change the title of a tab after creating it.
2020-04-06LibGUI: Add remove_tab and on_change to TabWidgetOriko
2020-02-25AK: Make Vector use size_t for its size and capacityAndreas Kling
2020-02-23LibGUI: Add helper for constructing new TabWidget tabsAndreas Kling
This patch adds the following convenience helper: auto tab_widget = GUI::TabWidget::construct(); auto my_widget = tab_widget->add_tab<GUI::Widget>("My tab", ...); The above is equivalent to: auto tab_widget = GUI::TabWidget::construct(); auto my_widget = GUI::Widget::construct(...); tab_widget->add_widget("My tab", my_widget);
2020-02-23LibGUI: Remove parent parameter to GUI::Widget constructorAndreas Kling
2020-02-14LibGUI: Remove some header dependencies from Widget.hAndreas Kling
2020-02-06LibGUI: Remove leading G from filenamesAndreas Kling