Commit Graph

18049 Commits

Author SHA1 Message Date
Cesar Torres
809f1d984d SoundPlayer: Implement the Fast Fourier Transform algorithm 2021-03-27 10:20:55 +01:00
Cesar Torres
f4f5a1c0e7 AK: Add complex number library
Useful for diverse algorithms.
Also added some tests for it.
2021-03-27 10:20:55 +01:00
Cesar Torres
0d5e1e9df1 Everywhere: rename 'Sample' type to 'Frame'
Because it's what it really is. A frame is composed of 1 or more samples, in
the case of SerenityOS 2 (stereo). This will make it less confusing for
future mantainability.
2021-03-27 10:20:55 +01:00
networkException
f4bd095aa3 shot: Added option to output to clipboard instead of file
This allows screenshots to be easily used in PixelPaint for example :^)
2021-03-27 09:07:02 +01:00
Idan Horowitz
c01f4c3ed8 gunzip: Fail gracefully on bad input
Instead of crashing on a missing input file, looping forever on an
invalid gzip compressed file, and crashing on permissions issues in
the output file, handle all issues gracefully by logging and returning.
2021-03-26 23:00:10 +01:00
Linus Groh
0b799dd3b7 LibJS: VERIFY(!this_value.is_empty()) in VM::call_internal()
Just a sanity check, this must never happen. Manual invocations of
call() e.g. in LibWeb bindings must pass js_undefined() if no specific
this value is desired, which OrdinaryCallBindThis will then use as-is or
turn into the global this value in non-strict mode.
2021-03-26 22:59:47 +01:00
Linus Groh
056ffa4abb LibWeb: Call requestAnimationFrame() callback with undefined this value
We were leaking an empty value via the callback's this value:

    requestAnimationFrame(function () {
        this; // <-- empty value
    });
2021-03-26 22:59:47 +01:00
Federico Guerinoni
49a062f81d LibGUI: Show human readable size in filemanager
The size is visible only in TableView mode of the filemanager.
2021-03-26 22:59:09 +01:00
Linus Groh
8fe7983cc5 LibMarkdown: Remove unused Paragraph::add_line() declaration 2021-03-26 22:58:36 +01:00
Timothy Flynn
cd82fd24e2 Browser: Add right-click context menu item for editing bookmarks
This allows users to right-click on a bookmark button to open a small
dialog for editing bookmark titles and URLs.
2021-03-26 22:58:31 +01:00
Timothy Flynn
990e362a17 LibGUI: Allow assigning a value to a specific index in JsonArrayModel 2021-03-26 22:58:31 +01:00
Timothy Flynn
4babf6e4e1 AK: Allow assigning a value to a specific index in a JsonArray 2021-03-26 22:58:31 +01:00
Timothy Flynn
74e9a892e3 LibWeb: Compute height of absolutely positioned blocks when possible
Section 10.6.4 rule 5 of the CSS height property spec outlines a method
to compute the height of an absolutely positioned block when the 'top'
and 'bottom' CSS properties are specified.
2021-03-26 22:58:13 +01:00
Timothy Flynn
03990fcb89 LibWeb: Consider floating children when computing auto-height
The case for computing auto-height of block elements which have block-
level children was erroneously skipping some children:

1. If the block element itself is absolute or floating, all children
   were skipped due to a likely typo ("box" vs. "child_box" inside the
   for-each loop).

2. Floating children should only be skipped if the block element's
   'overflow' property computes to 'visible', per section 10.6.3 of the
   CSS height property spec. If the property computes to another value,
   section 10.6.7 only indicates that absolutely positioned children
   should be skipped.
2021-03-26 22:58:13 +01:00
Andreas Kling
f018100d21 Utilities: Add a simple "shot" utility for grabbing screenshots :^)
This little CLI program grabs the current screen image from
WindowServer and saves it as a PNG file.
2021-03-26 20:33:23 +01:00
Andreas Kling
d9f8f6a2d0 WindowServer: Add an IPC call for taking a screenshot
This patch adds Messages::WindowServer::GetScreenBitmap. It returns the
currently displayed on-screen bitmap as-is, as a Gfx::ShareableBitmap.
2021-03-26 20:33:23 +01:00
Timothy Flynn
557927f25b LibWeb+WebContent: Support displaying favicons in OOPWV
In single process mode, the browser will display a page's favicon in
both the location bar and tab. This adds the same support for multi-
process mode.
2021-03-26 16:55:51 +01:00
Michel Hermier
ff0d4c6f7c Kernel: Remove unused WorkQueue::m_name. 2021-03-26 16:54:05 +01:00
Michel Hermier
51ad3da999 Kernel: Remove unused MBRPartitionTable::m_partitions_count. 2021-03-26 16:54:05 +01:00
Michel Hermier
4ac49eabd5 Kernel: Remove unused FileBlockCondition::m_file. 2021-03-26 16:54:05 +01:00
Michel Hermier
a359f477a7 Kernel: Remove unused EBRPartitionTable::m_partitions_count. 2021-03-26 16:54:05 +01:00
Michel Hermier
37be679d6e Kernel: Remove unused AHCIPort::ScatterList::m_device_block_size. 2021-03-26 16:54:05 +01:00
Andreas Kling
ecb0ae9c33 WindowServer: Keep menu open when activating a menu item with Ctrl held
This makes it easy to "try out" different options (like system themes!)
in a menu without having to re-open the menu over and over. :^)
2021-03-26 14:45:15 +01:00
Andreas Kling
b31b904ad0 WindowServer: Redraw all menus on system theme change 2021-03-26 14:42:38 +01:00
Andreas Kling
4b6fba1e4c WindowServer+LibGfx: Make menubar menus slightly larger
Also make sure the left/right padding is equally large.
2021-03-26 14:25:37 +01:00
Andreas Kling
3020f5efd9 Taskbar: Add more prominent Help app icon in the start menu 2021-03-26 13:54:56 +01:00
Andreas Kling
b8a9f433f9 Taskbar: Move "About SerenityOS" to the top of the start menu 2021-03-26 13:31:10 +01:00
Linus Groh
b220c89c5c WindowServer: Adjust position of flipped submenus by menu item height
Fixes #5950.
2021-03-26 09:25:22 +01:00
Linus Groh
8461100bf7 WindowServer: Add clip rect to menubar painter
Fixes #5951.
2021-03-26 09:25:22 +01:00
Andreas Kling
6203a4a2e9 WindowServer: Remove unused Menu->MenuBar link and "title font"
We kept a backpointer from the Menu to its containing MenuBar, but it
was not used for anything so let's remove it.

Since all menus have the same font now, there's no need to track a
separate "title font".
2021-03-26 09:12:32 +01:00
Andreas Kling
dfb81242f3 WindowServer: Redraw window menubars when moving with arrow keys
Also, make sure we don't draw a menu in hovered state while another
menu is open.

Fixes #5949.
2021-03-26 08:59:32 +01:00
Andreas Kling
6ae174f80a WindowServer: Remove some leftover unused menubar things 2021-03-26 08:54:33 +01:00
Andreas Kling
e94e94becc Base: Remove SystemMenu from SystemServer.ini 2021-03-26 08:20:53 +01:00
Andreas Kling
baae3f706a Taskbar: Only show H:M:S by default, move date to tooltip 2021-03-25 23:32:00 +01:00
Andreas Kling
e9db10e3a9 WindowServer+LibGUI: Remove the global menubar :^)
This leaves menu applets running but invisible, and that's a regression
we need to take care of obviously. But not today, because it's getting
too late.
2021-03-25 23:27:11 +01:00
Andreas Kling
1108c41790 WindowServer: Don't fill the active menubar menu with selection color 2021-03-25 23:19:57 +01:00
Andreas Kling
128c4c2db0 Base: Tweak "Redmond 2000" theme menu colors 2021-03-25 23:19:41 +01:00
Andreas Kling
327866520a WindowServer: Remove "system menu" concept from WindowServer 2021-03-25 23:08:34 +01:00
Andreas Kling
619a223800 SystemMenu: Remove SystemMenu service
This has been replaced by the Taskbar's start menu.
2021-03-25 23:08:29 +01:00
Andreas Kling
73a2045c5b Taskbar: Add start menu :^)
This will replace the system menu in the top left of the screen.
The button behavior doesn't feel quite perfect yet, but this will
work for now!
2021-03-25 22:55:10 +01:00
Andreas Kling
32c6e31f4c LibGUI: Make it possible to tweak icon spacing on a GUI::Button
This is the space between the icon and the text on buttons that have
both icon and text.
2021-03-25 22:41:40 +01:00
Andreas Kling
11e190b323 Base: Remove clock and username applets from startup
The clock has moved to the taskbar, and let's see how we feel without
the username being on screen all the time.
2021-03-25 22:40:51 +01:00
Andreas Kling
0668b5beef Taskbar: Integrate clock widget into taskbar window
Instead of running the clock widget as a separate menu applet,
let's just draw a clock here in the taskbar window.
2021-03-25 22:14:09 +01:00
Andreas Kling
fc84076f18 WindowServer: Remove SetApplicationMenubar IPC message 2021-03-25 22:14:09 +01:00
Andreas Kling
78b12e1521 Userland: Turn all application menus into window menus :^) 2021-03-25 22:14:09 +01:00
Andreas Kling
fcc8e3484f WindowServer: Remove the global app menu
The SetApplicationMenu IPC message is still there, since we also need
to clean up all of the client code before we can remove that.
2021-03-25 22:14:09 +01:00
Andreas Kling
05cc7d69ac WindowServer: Tweak the look of menus
Paint menus with a flatter outline instead of giving them the regular
window border.
2021-03-25 22:14:09 +01:00
Andreas Kling
91a68cb5d8 Base: Tweak menu colors in default theme a little bit
Let's brighten up the menu stripe for a slightly fresher look.
2021-03-25 22:14:09 +01:00
Andreas Kling
e76771bfad WindowServer+LibGfx: Show menus in windows! :^)
This patch begins the transition away from the global menu towards
per-window menus instead.

The global menu looks neat, but has always felt clunky, and there
are a number of usability problems with it, especially in programs
with multiple windows.

You can now call GUI::Window::set_menubar() to add a menubar to
your window. It will be specific to that one window only.
2021-03-25 22:14:09 +01:00
Andreas Kling
1daaa4f38d LibGUI: Add GUI::MenuBar::menubar_id()
Just exposing the menubar ID on the WindowServer side.
2021-03-25 22:14:09 +01:00