1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 21:45:08 +00:00
Commit graph

1186 commits

Author SHA1 Message Date
Ben Wiederhake
ebabce30bd LibGUI: Display hidden columns as hidden
Until now, hidden columns were displayed as visible in the context menu.
An easy way to reproduce this is:
- Open the TextEditor
- Ctrl-O to open the file selector
- Switch to table view
- Right-click the header

Expected behavior:
Hidden columns like 'Owner' and 'Group' should not have a checkmark,
because they are hidden.

Actual behavior: They did have a checkmark. Clicking on it to 'hide'
the already hidden column removed the checkmark, but was a no-op to the
table view.

This commit fixes this behavior, by correctly initializing the context menu,
and properly updating the context menu if external code calls
'set_column_hidden' later.
2020-05-02 14:12:36 +02:00
Ben Wiederhake
55ff392835 LibGUI: Remove unneeded access rights 2020-05-02 14:12:36 +02:00
Andreas Kling
3331098aee WindowServer+LibGUI+Taskbar: Don't include frameless windows in lists
Frameless windows don't need to show up in the taskbar or the switcher.
2020-05-02 12:24:23 +02:00
AnotherTest
7670e5ccf0 LibCore+LibHTTP: Move out the HTTP handler and add HTTPS 2020-05-02 12:24:10 +02:00
Andreas Kling
745b0b27fd WindowServer+LibGUI: Automatically close child windows with parent
If a window has child windows when it's destroyed, WindowServer will
now automatically tear down all of its children as well.

This is communicated to the client program through a vector of window
ID's included with the response to WindowServer::DestroyWindow.

This does feel a little bit awkward, but managing it on the client side
also seems a bit awkward.
2020-05-02 01:29:55 +02:00
Andreas Kling
828aee9932 LibGUI: Make ComboBox list pop-up windows frameless
This is much better than the hack we had of making them Tooltip windows
since frameless windows end up at the right layer in the window stack
automatically, and always get yanked above the parent window simply by
being child windows.
2020-05-02 01:29:55 +02:00
Andreas Kling
d847304cb9 WindowServer+LibGUI: Add "frameless" window flag
This allows you to create windows with no title bar or window frame.
2020-05-02 01:29:55 +02:00
Andreas Kling
bb7eb3e104 WindowServer+LibGUI: Remove unused Window::show_titlebar() flag
Nobody was using this flag, so let's stop maintaining it. It's easy to
add it back if we ever want the behavior.
2020-05-02 01:29:55 +02:00
Andreas Kling
6228f72b87 LibGUI+WindowServer: Inform WindowServer about parent/child windows
If a window has another window in its Core::Object ancestor chain,
we now communicate that relationship to WindowServer so that it can
act with awareness of parent/child windows.
2020-05-02 01:29:55 +02:00
Linus Groh
43c1fa9965 LibJS: Implement (no-op) debugger statement 2020-05-01 22:07:13 +02:00
Hüseyin ASLITÜRK
5c022ac939 LibGUI: INI file syntax highlighter 2020-05-01 16:58:18 +02:00
Hüseyin ASLITÜRK
5267ccbc22 LibGUI: Icon for INI file type 2020-05-01 16:58:18 +02:00
Andreas Kling
770dedcc23 LibGUI: Remove some ancient unused debug logging 2020-04-30 22:42:02 +02:00
Andreas Kling
8fc6ff94fe LibGUI: Scale TabWidget tabs according to available space
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-30 09:28:36 +02:00
Andreas Kling
f2cdef5c47 LibGUI: Cycle through TabWidget tabs with Ctrl+Tab / Ctrl+Shift+Tab
Fixes #2022.
2020-04-30 09:04:39 +02:00
Andreas Kling
9f32d71782 LibGUI: Use "OK, Cancel" button order in InputBox 2020-04-29 19:31:15 +02:00
Andreas Kling
77916f030f LibGUI: Use "OK, Cancel" button order in ColorPicker 2020-04-29 19:29:09 +02:00
Andreas Kling
51ab0e967e LibGUI: Use a sunken GUI::Frame for the ColorPicker color spectrum
This looks a lot nicer than just a plain widget. :^)
2020-04-29 19:28:19 +02:00
Andreas Kling
d7d5788469 LibGUI: ColorPicker should pick custom color from bitmap, not window
It's not always safe to access pixel data of a window's backing store
since the kernel may decide to purge it at his leisure. Fix this by
instead picking colors from the color spectrum bitmap directly instead.

Also fix up mouse event logic while we're here so it only cares about
the left mouse button

Fixes #1657.
2020-04-29 19:17:40 +02:00
Andreas Kling
6a01827046 LibGUI: Exit ColorPicker (successfully) when double-clicking a color
It feels natural that if I double click a color button, the dialog
closes successfully and "returns" that color.
2020-04-29 19:17:40 +02:00
Andreas Kling
57fe4d19ac LibGUI: Remove unnecessary is_enabled() checks in mouse event handlers
We never deliver mouse events to disabled widgets, so there's no need
to check is_enabled() in these event handlers.
2020-04-29 19:17:40 +02:00
Andreas Kling
cdbc252190 LibGUI: Require a full click on ColorInput's color rect to open picker
Let's not open the ColorPicker on mousedown, that was too jarring.
2020-04-29 19:17:40 +02:00
Andreas Kling
f8069418e1 LibGUI: Transfer "color has alpha channel" state 2020-04-29 16:22:09 +02:00
Andreas Kling
c7107385ee LibGUI: Allow disabling the alpha channel in ColorInput widgets 2020-04-29 15:33:36 +02:00
Andreas Kling
bc305a16ae LibGUI: Allow editing ColorInput widgets as text
You can now enter a specific color as #rrggbb instead of clicking your
way through the color picker.

If you still want the color picker, just click the little color rect in
the widget and we'll bring up a ColorPicker. For a visual cue that this
rect is interactive, we use a hover hand cursor when hovering the rect.
2020-04-29 15:30:01 +02:00
Andreas Kling
033a4aee50 LibGUI: Remove copy-pasted auto-repeat logic from ColorInput
This was copy-pasted from button classes and not useful here.
2020-04-29 14:38:19 +02:00
Andreas Kling
f0cde70c18 LibGUI: Simplify submenu construction
The API for adding a submenu to a menu is now:

auto& submenu = menu.add_submenu("Name");
submenu.add_action(my_action);
2020-04-29 11:48:11 +02:00
Andres Vieira
711bcff0da LibGUI: Paint CheckBox background same as widget's if it's not enabled 2020-04-28 15:14:02 +02:00
Andres Vieira
be8dc41b9c LibGUI: Paint TextEditor background same as widget's if it's not enabled
Now TextEditor draws it's background as a colour that does not make the
user think it can be writed into. This also affects TextBox.
2020-04-28 15:14:02 +02:00
Hüseyin ASLITÜRK
c9c1d1fae0 LibGUI: Create thumnail for gif files 2020-04-26 18:44:20 +02:00
Andreas Kling
37918d4141 Revert "LibGUI: Use bold font for the currently active TabWidget tab"
This reverts commit 4d8206f7c2.

This was not visually pleasant. We'll have to come up with some better
way to distinguish the active tab in Browser.
2020-04-26 17:46:16 +02:00
Linus Groh
e8f6f655bf LibGUI: Use filetype-text icon for .md files 2020-04-26 01:12:14 +02:00
Linus Groh
634c834283 LibGUI: Use filetype-header icon for .h files 2020-04-26 01:12:14 +02:00
Linus Groh
4d0a344da0 Base+LibGUI: Add icon for Python files 2020-04-26 01:12:14 +02:00
Linus Groh
9de184d883 LibGUI: Use enumerator macros for filetype icons 2020-04-26 01:12:14 +02:00
Andreas Kling
dc6b61dbcc LibGUI: Add ToolBar and ToolBarContainer to Forward.h 2020-04-25 17:20:10 +02:00
Andreas Kling
1887dc6de4 LibGUI: Make ToolBarContainer better at reacting to child events
Now you can remove a ToolBar from a ToolBarContainer and it will update
its own preferred size automatically.
2020-04-25 17:16:05 +02:00
Itamar
393560d8a2 HackStudio: GUI support for setting breakpoints on source code lines 2020-04-25 13:16:46 +02:00
Andreas Kling
0f4fa43541 LibGUI: Tweak TabWidget tab icon placement 2020-04-24 22:49:57 +02:00
Andreas Kling
4d8206f7c2 LibGUI: Use bold font for the currently active TabWidget tab 2020-04-24 22:44:36 +02:00
Andreas Kling
d6bbf12b7c LibGUI: Add "uniform tabs" mode to TabWidget (all tabs have same width)
...and enable this in the main Browser UI. :^)
2020-04-24 22:36:25 +02:00
Andreas Kling
53cb5325ee LibGUI: Allow TabWidget tabs to have icons and custom text alignment 2020-04-24 22:27:46 +02:00
Andreas Kling
45a932a600 Base: New "cut" action icon 2020-04-24 20:42:34 +02:00
Andreas Kling
1587b53001 LibGUI: Allow overriding the padding inside a TabWidget 2020-04-24 20:42:34 +02:00
DexesTTP
424f47cbe5 LibGUI: Fix display issue when selecting multi-lines in TextEditor
When selecting the start of a multi-line line, a selection rect was
displayed for the whole line but the text wasn't rendered properly.
This change prevents the selection rect from being drawn in virtual
lines with no selected characters.
2020-04-24 20:29:47 +02:00
Andreas Kling
c350bb9178 LibGUI: Fix laggy mouse selection in TextEditor widget
We were letting the automatic scrolling timer drive all selection
updates to fix an unwanted acceleration that was happening. However,
if a mousemove occurs *within* the editor widget, we should just
handle it right then and there.
2020-04-24 19:14:22 +02:00
Andreas Kling
344e66caaa LibGUI: Shrink GUI::Splitter by 1 pixel to make it look just right
Splitters were slightly oversized to work around the fact that we
were ignoring 2px on both sides of them. Now that the whole splitter
can be interacted with, we can lose 1px of fat and look great! :^)
2020-04-24 19:05:04 +02:00
Andreas Kling
42f0b2522b LibGUI: Introduce widget content margins + improve splitters
A GUI::Widget can now set an optional content margin (4x0 by default.)
Pixels in the content margin will be ignored for hit testing purposes.

Use this to allow frame-like widgets (like GUI::Frame!) to ignore any
mouse events in the frame area, and instead let those go to parent.

This allows GUI::Splitter to react "sooner" to mouse events that were
previously swallowed by the child widgets instead of ending up in the
splitter. The net effect is that 2 more pixels on each side of a
splitter handle are now interactive and usable for splitting! :^)
2020-04-24 19:05:02 +02:00
Andreas Kling
5d88022252 LibGUI: When removing a TabWidget tab, activate the next tab 2020-04-24 17:10:59 +02:00
Andreas Kling
a2bdcfabc9 LibGUI: Grant focus when activating a new stack/tab child widget
This makes opening a tab actually focus the opened tab.
2020-04-24 14:34:24 +02:00