Commit graph

9311 commits

Author SHA1 Message Date
Andreas Kling
97adcde36e LibWeb: Teach HtmlView how to open a .txt file
When encountering a text file, we now put it in a wrapper document with
the file contents in a <pre> tag. This works really nicely :^)
2020-05-10 22:32:12 +02:00
Andreas Kling
0e60e7aef0 LibWeb: Add Document create_element() and create_text_node() helpers 2020-05-10 22:32:12 +02:00
Andreas Kling
9d7ab13b32 LibWeb: Add Text to the forwarding header 2020-05-10 22:32:12 +02:00
Andreas Kling
f2058a39bf WindowServer: Shade the bottom of the menu bar like a button
This adds a row of secondary (darker) shade to the menubar, giving it
a more buttonish look to match the highlight added to the Taskbar. :^)
2020-05-10 22:32:12 +02:00
Andreas Kling
4e766c8159 Taskbar: Let's custom paint the background instead of using GUI::Frame
Previously we were wasting the bottom pixel row on darkness. Use the
base button color all the way to the bottom row and offset the top
highlight by one pixel instead.
2020-05-10 22:32:12 +02:00
Brian Callahan
f15b467b5d Ports: Add dash shell 2020-05-10 19:42:48 +02:00
Brian Callahan
092bda2f14 Ports: Add tr utility 2020-05-10 19:41:35 +02:00
Brian Callahan
baf6efb46f Ports: Fix binutils runtime 2020-05-10 19:41:09 +02:00
Linus Groh
4c1a765076 LibWeb: Add basic support for "border-style: {dotted,dashed}" 2020-05-10 19:41:00 +02:00
Linus Groh
0669dbcf5d LibGfx: Add support for dashed lines
Non-configurable for now.
2020-05-10 19:41:00 +02:00
Andreas Kling
3667677008 ls: Emit hyperlinks for files outside the current directory 2020-05-10 17:48:41 +02:00
Andreas Kling
666863c2d8 LibVT: Clear the hovered hyperlink after completing a drag 2020-05-10 17:42:24 +02:00
Andreas Kling
f41bbdd46e LibVT: Allow dragging hyperlinks :^)
You can now drag a hyperlink as a text/uri-list. This allows you to
drag a file from "ls" output and drop it on a FileManager to copy
the file there. Truly futuristic stuff!
2020-05-10 17:39:11 +02:00
Andreas Kling
901d2e3236 LibVT: Make selection follow terminal history scrollback :^)
The buffer positions referred to by a VT::Position now include history
scrollback, meaning that a VT::Position with row=0 is at the start of
the history.

The active terminal buffer keeps moving in VT::Position coordinates
whenever we scroll. This allows selection to follow history. It also
allows us to click hyperlinks in history.

Fixes #957.
2020-05-10 16:59:02 +02:00
Andreas Kling
c50672a19d Shell: Hyperlink output from "pwd" and "dirs" built-ins :^) 2020-05-10 16:24:59 +02:00
Andreas Kling
8af3af137e LibVT: Use the "ActiveLink" theme color for links being clicked
Okay, links are finally starting to feel visually intuitive. :^)
2020-05-10 16:14:49 +02:00
Andreas Kling
ab7de41c7b LibVT: Don't commit to opening a hyperlink until mouseup
It felt too rushed to open links when simply mousedown'ing on them.
Improve this by implementing basic "click" semantics instead.

This patch also introduces the ability to prevent link opening if you
want to force selection instead. Hold shift and we will not open links.
2020-05-10 16:01:08 +02:00
Andreas Kling
c6f098c5a9 WindowServer: Add 2px of tasteful space above maximized windows
This makes the visual interaction between the menu bar and the window
a lot less janky looking.
2020-05-10 14:46:23 +02:00
Andreas Kling
61e112d3b7 DisplaySettings: Tweak app icon 2020-05-10 14:40:36 +02:00
Andreas Kling
fce0cf18e3 LibGfx: Make buttons slightly chunkier on the top/left side 2020-05-10 14:24:20 +02:00
Andreas Kling
5af4ad097f Base: Open .font files in FontEditor again
This broke when we introduced LaunchServer.
2020-05-10 14:24:04 +02:00
Andreas Kling
c10c6240f2 LibVT: Open hyperlinks on plain left-click instead of Ctrl+Click 2020-05-10 13:45:04 +02:00
Andreas Kling
3226276fe9 LibVT: Always draw hyperlinks with a dotted underline
The dotted line is custom painted to put some more distance between the
dots than what Painter::draw_line() does.
2020-05-10 13:43:56 +02:00
Linus Groh
d3d29ea1cc Demos: Add LibGfx Demo :^) 2020-05-10 13:34:59 +02:00
Linus Groh
59d00e5df6 LibGfx: Replace 'bool dotted' with a LineStyle::{Solid,Dotted} enum
Just a bool is insufficient as we'll have to support dashed lines as well.
2020-05-10 13:34:59 +02:00
Linus Groh
da42279171 LibGfx: Fix dotted lines with thickness > 1
If we just skip every second pixel, we still get a solid line if each
"pixel" is wider than 1!
Now we skip the same amount of pixels as the line is thick.
2020-05-10 13:34:59 +02:00
Shannon Booth
eb43e2d544 WindowServer: Add basic search functionality in menus
Perform a case insensitive search through the current menu. Jump to the
first item matching all keys in the current search. Backspace can clear
the current search, and the search will timeout after 3 seconds.
2020-05-10 13:34:51 +02:00
Shannon Booth
d5c40899cb WindowServer: Rework and simplify Menu event handling
The menu manager will now send events directly to the current menu.
Previously if a menu was opened it would always be set as the current
menu. Now when opening a menu you can optionally say that you do not
want to have it as the current menu.

One scenerio when this happens is when a menu is popped up as part of a
preview, for example, when hovering over a menu item that is a submenu.

Sending the event to the current menu simplifies things and solves a few
inconsistencies in bevhaviour (such as hovering over a submenu, but key
events not being sent to the submenu).
2020-05-10 13:34:51 +02:00
Shannon Booth
b1c83e5a64 WindowServer: Remove stray semicolon 2020-05-10 13:34:51 +02:00
Andreas Kling
5fcd25e8f6 Browser: Use "about:blank" as the default home page
This can be overridden in Browser.ini, but if there's no value there,
we now use "about:blank"
2020-05-10 11:18:47 +02:00
Andreas Kling
fe0de26277 LibWeb+Browser: Support about: URL protocol so "about:blank" works :^)
For now, we simply load an empty resource from any about: URL.
2020-05-10 11:14:30 +02:00
Andreas Kling
56dbe58bbb AK: Add support for about: URLs 2020-05-10 11:11:48 +02:00
AnotherTest
6b674db855 Shell: Support basic syntax highlighting 2020-05-10 10:23:05 +02:00
AnotherTest
c40fd3a902 LibLine: Support RGB colors
This also patches Userland/js.
2020-05-10 10:23:05 +02:00
AnotherTest
8487806ec0 LibVT: Support RGB colors (\x1b[38;2;<r>;<g>;<b>m) 2020-05-10 10:23:05 +02:00
AnotherTest
ccdef5a675 LibLine: Expose actual_rendered_string_length & accept newlines in prompt 2020-05-10 10:23:05 +02:00
AnotherTest
1d0d0e9d00 Shell: Parse comments 2020-05-10 10:23:05 +02:00
AnotherTest
a862c230b1 Shell: Include some metadata in parsed tokens and ask for continuation
This patchset adds some metadata to Parser::parse() which allows the
Shell to ask for the rest of a command, if it is not complete.
A command is considered complete if it has no trailing pipe, or
unterminated string.
2020-05-10 10:23:05 +02:00
Yonatan Goldschmidt
2ac3d33c63 LibC: Fix get{sock,peer}name to match their kernel-side prototypes
In f4302b58fb, the kernel-side syscalls (e.g Process::sys$getsockname)
were updated to use SC_get{sock,peer}name_params, but the libc
functions were not updated.
2020-05-10 01:04:10 +02:00
Andreas Kling
9e74793ce2 LibGUI+LibGfx: Paint scollbar tracks with a dithered pattern
Instead of a solid color, we now paint the track/gutter of scrollbars
using a 2-color dither pattern for a pleasant millennium feel. :^)
2020-05-10 01:02:06 +02:00
AnotherTest
ac701cb589 Userland: Send absolute paths to LaunchServer and show what failed 2020-05-10 00:39:14 +02:00
AnotherTest
21efd96c64 LibDesktop: Return the correct value in OpenUrl
This patch fixes a tiny issue where the result of open_url would always
be true, since handle(OpenUrl) returns the message instead of the
result.
2020-05-10 00:39:14 +02:00
Linus Groh
358694567f Meta: Add script to enforce license headers & run it on Travis 2020-05-09 23:55:58 +02:00
FalseHonesty
60024ab574 Browser: Close tabs when middle clicked 2020-05-09 23:54:20 +02:00
FalseHonesty
bb6258229a LibGUI: Add hook when a tab is middle clicked 2020-05-09 23:54:20 +02:00
Andres Vieira
cbbfc08f1d Docs: Add unzip(1) man page 2020-05-09 23:50:44 +02:00
Andres Vieira
78f334f447 Base: Add a "zip" folder to /home/anon/ with a .zip file to test 2020-05-09 23:50:44 +02:00
Andres Vieira
7433210fa6 Userland: Add unzip command
The unzip command will unzip a zip file passed as an argument into the
current pwd, with the syntax:
   unzip file.zip

This implementation is pretty barebones as it does not support things
like file access times, compression or even compression detection, so
if the user tries to unzip a compressed zip most probably he would find
wrong data inside the files.

However it's an starting point :^)
2020-05-09 23:50:44 +02:00
Linus Groh
54c4cd8a66 Meta: Delete empty .cpp files 2020-05-09 23:45:16 +02:00
Linus Groh
82cb751907 Lagom: Add missing copyright header to FuzzJS.cpp 2020-05-09 23:45:16 +02:00