Commit Graph

980 Commits

Author SHA1 Message Date
Brian Gianforcaro
edb66f214d SystemMonitor: Fix display of file system size column.
The Size column in the "File systems" tab of SystemMonitor
had a rendering artifact where the bounding box outline would
be drawn in the same location as the text. This makes the text
look strange and hard to read.

Pad the size with a signle space character on either side to
give the text a gap on each side.
2020-02-22 21:25:00 +01:00
Andreas Kling
21c78e2fc3 SystemMenu: Silence debug spam on startup 2020-02-22 17:01:06 +01:00
Tibor Nagy
e490fc9e35 FontEditor: Make the application theme-aware 2020-02-20 14:19:30 +01:00
Andreas Kling
7592f9afd5 AK: Use size_t for CircularQueue and CircularDeque 2020-02-20 13:20:34 +01:00
Andreas Kling
88b9fcb976 AK: Use size_t for ByteBuffer sizes
This matches what we already do for string types.
2020-02-20 13:20:34 +01:00
Tibor Nagy
6eae2ef9cf HexEditor: Make the application theme-aware
Also updates the ruler style a bit to be more consitent with TextEditor.
2020-02-19 12:24:39 +01:00
Tibor Nagy
ca4d4cac45 HexEditor: Clear tracked changes when setting a new buffer 2020-02-19 10:10:53 +01:00
Tibor Nagy
97878dfb4d HexEditor: Fix out of bounds cursor
Fixing out of bounds cursor in three different cases:
- when the buffer is empty
- when loading new files
- when entering values at the end of the buffer
2020-02-19 10:10:53 +01:00
Andreas Kling
25b987ce4c SystemMenu: Use pledge() and unveil() 2020-02-17 20:20:46 +01:00
Andreas Kling
b711f1eab5 SystemMenu: Finish the implementation and start this at boot :^)
Fixes #1231.
2020-02-17 20:20:32 +01:00
Andreas Kling
737e455cbc SystemMenu: Add a separate program to host the system menu
This will allow us to run the system menu as any user. It will also
enable further lockdown of the WindowServer process since it should no
longer need to pledge proc and exec. :^)

Note that this program is not finished yet.

Work towards #1231.
2020-02-17 16:50:48 +01:00
thatlittlegit
6eccd166ed SystemDialog: Use Yes/No dialog instead of OK/Cancel
This also removes some unecessary debug lines. (The debug lines are
unnecessary because LibGUI already outputs the debug information, so
SystemDialog just doubled it up.)
2020-02-17 16:28:21 +01:00
thatlittlegit
14aaf75e3a TextEditor: Use Yes/No/Cancel for some dialogs when buffer is dirty 2020-02-17 16:28:21 +01:00
Andreas Kling
a6e69bda71 AK: Add basic Traits for RefPtr
This allows RefPtr to be stored in a HashTable<RefPtr<T>> :^)

It's unfortunate about the const_casts. We'll need to fix HashMap::get
to play nice with non-const Traits<T>::PeekType at some point.
2020-02-16 21:58:17 +01:00
Andreas Kling
0415db30c6 WindowServer: Move configuration file into /etc/WindowServer
This is in preparation for running WindowServer as a separate user.
2020-02-16 21:58:17 +01:00
Tibor Nagy
1176167944 Piano: Set step property for ADSR sliders 2020-02-16 21:58:01 +01:00
Andreas Kling
2143da6434 LibGUI: Add forwarding header
This patch adds <LibGUI/Forward.h> and uses it a bunch.
It also dragged various header dependency reduction changes into it.
2020-02-16 09:41:56 +01:00
thatlittlegit
51628f64fa Welcome: Apply @shannonbooth's recommendations 2020-02-15 20:46:10 +01:00
thatlittlegit
c07c442640 Welcome: Change copyrights in my code to 'SerenityOS developers' 2020-02-15 20:46:10 +01:00
thatlittlegit
f4958aea21 Welcome: Reduce the width and margins of the menu
I think it looks better where it takes up less space.
2020-02-15 20:46:10 +01:00
thatlittlegit
d5617fc855 Welcome: 'Welcome to Serenity' -> 'Welcome to SerenityOS' 2020-02-15 20:46:10 +01:00
thatlittlegit
7a3bdf3563 Welcome: Add icons to welcome entries 2020-02-15 20:46:10 +01:00
thatlittlegit
a55b96a1ea Welcome: Separate text from source code by parsing
This allows modification at runtime, as well as easier editing than C++
structures.
2020-02-15 20:46:10 +01:00
thatlittlegit
7caa8b7531 Welcome: Add pledge and unveil 2020-02-15 20:46:10 +01:00
thatlittlegit
37daae1451 Welcome: Use a proper heading font for 'Welcome to Serenity!' 2020-02-15 20:46:10 +01:00
thatlittlegit
ce2c1e824d Welcome: Push in the buttons depending on which page is selected 2020-02-15 20:46:10 +01:00
thatlittlegit
783f5dc07f Welcome: Replace PNG background with gradient
This allows scaling to larger window sizes, something that the PNG
didn't do well.
2020-02-15 20:46:10 +01:00
thatlittlegit
d647749737 Welcome: Remove crash and ensure text doesn't all stay on one line.
When size_t replaced int (6f4c370), it caused the 'start = -1' trick to
fail, setting start to (unsigned)-1 instead. This then caused
String.substring to fail, as that is a little bit higher than the length
of the string! This resulted in an outright crash.

Later, the builder is not reset before making a new line. This causes
the line to simply be the earlier one, but with more text on it.

(There's also a few changes from clang-format, namely the #include
reorganization.)

Fixes #1211 (although I wasn't aware of it when I made this commit).
2020-02-15 20:46:10 +01:00
Andreas Kling
b011ea9962 LibGUI: Reduce menu-related header dependencies 2020-02-15 01:56:30 +01:00
Andreas Kling
dcb0766d3f LibGUI: Remove some header dependencies from Application.h 2020-02-15 01:18:32 +01:00
Andreas Kling
e1ff4fa034 LibGUI: Remove more header dependencies from Widget.h 2020-02-15 00:24:14 +01:00
Andreas Kling
69400c2ca1 LibCore: Replace manual forward declarations with <LibCore/Forward.h> 2020-02-15 00:13:44 +01:00
Andreas Kling
34c7322d77 LibGUI: Remove some header dependencies from Widget.h 2020-02-14 23:53:11 +01:00
Andreas Kling
3fe2640c8c LibGfx: Add forward declaration header
This patch adds <LibGfx/Forward.h> with forward declarations for Gfx.
2020-02-14 23:31:18 +01:00
Andreas Kling
8f7333f080 LibCore: Add a forward declaration header
This patch adds <LibCore/Forward.h> and uses it in various places to
shrink the header dependency graph.
2020-02-14 23:31:18 +01:00
Andreas Kling
3bbf4610d2 AK: Add a forward declaration header
You can now #include <AK/Forward.h> to get most of the AK types as
forward declarations.

Header dependency explosion is one of the main contributors to compile
times at the moment, so this is a step towards smaller include graphs.
2020-02-14 23:31:18 +01:00
Andreas Kling
814d59f462 LibGUI: Port the drag&drop code to Core::MimeData 2020-02-14 13:18:59 +01:00
Andreas Kling
4dc15fc063 FileManager: Copy item(s) when dragging and dropping them :^)
This patch implements basic drag & drop file management in a narrow set
of cases. You can now drag & drop a file onto a folder in the same
directory, and the dropped file will be copied into the directory.

We'll need to support a lot more variations of this, but this is nice!
2020-02-13 21:57:02 +01:00
Andreas Kling
95fe78667f FileManager: Run clang-format on main.cpp 2020-02-13 21:54:27 +01:00
Andreas Kling
24dfc5051a IRCClient: Use Core::DateTime 2020-02-11 20:43:32 +01:00
Andreas Kling
6ecf90c6f8 SystemMonitor: Tweak bottom margin of the process table 2020-02-11 11:53:38 +01:00
Andreas Kling
14f9a29502 Terminal: Set up a nice $PROMPT for the shell :^) 2020-02-10 21:53:04 +01:00
ignas-sa
b67035c3ac
Calculator: Accept more keyboard input (#1207)
Allow user to clear/remove last numeral from input (Esc/Backspace
respectively) and type the decimal point.
2020-02-10 19:48:52 +01:00
William McPherson
aa149b9330 LibAudio/Piano: Replace floats with doubles
We should default to double-precision so that clients can make the
choice to use float or double.
2020-02-10 14:04:27 +01:00
William McPherson
4ad96df0d4 Piano: Draw stereo waves
Draw two waves in different colors.
2020-02-10 14:04:27 +01:00
William McPherson
93903c8064 Piano: Try to be more stereo-oriented 2020-02-10 14:04:27 +01:00
William McPherson
255edcb525 Piano: Add nice scale factor to WaveWidget 2020-02-10 14:04:27 +01:00
William McPherson
2a66878148 Piano: Ensure WaveWidget paints in-bounds
Letting GUI::Frame::paint_event() cover up your mistakes is tacky :P
2020-02-10 14:04:27 +01:00
William McPherson
60fdc6c9ab Piano: Put reset() with other setters 2020-02-10 14:04:27 +01:00
William McPherson
9997b0dbf5 Piano: Add sampler
This commit adds basic support for importing, viewing and playing WAV
samples at different pitches.

Naming issues:
- We are using the Sample struct from Music.h, but also the Sample
  struct from LibAudio (Audio::Sample). This is a little confusing.

set_recorded_sample() finds the peak sample and then divides all the
samples by that peak to get a guaranteed min/max of -1/1. This is nice
because our other waves are also bound between these values and we can
just do the same stuff. This is why we're using Audio::Sample, because
it uses floats, whereas Music.h's Sample uses i16s. It's a little
annoying that we have to use a mixture of floats and doubles though.

For playback at lower frequencies, we're calculating in-between samples,
rather than just playing samples multiple times. Basically, you get the
current sample and add the difference between the current sample and the
next sample multiplied by the distance from the current sample. This is
like drawing the hypotenuse of a right-angled triangle.
2020-02-10 14:04:27 +01:00