summaryrefslogtreecommitdiff
path: root/Userland/Applications/Spreadsheet/SpreadsheetView.cpp
AgeCommit message (Collapse)Author
2021-08-18Userland+LibGUI: Add shorthand versions of the Margins constructorsin-ack
This allows for typing [8] instead of [8, 8, 8, 8] to specify the same margin on all edges, for example. The constructors follow CSS' style of specifying margins. The added constructors are: - Margins(int all): Sets the same margin on all edges. - Margins(int vertical, int horizontal): Sets the first argument to top and bottom margins, and the second argument to left and right margins. - Margins(int top, int vertical, int bottom): Sets the first argument to the top margin, the second argument to the left and right margins, and the third argument to the bottom margin.
2021-08-10Spreadsheet: Call SheetModel::update() instead of invalidate()sin-ack
SheetModel has its own custom updating method, and that must be called in order to update the spreadsheet.
2021-08-06Everywhere: Replace Model::update() with Model::invalidate()sin-ack
Most of the models were just calling did_update anyway, which is pointless since it can be unified to the base Model class. Instead, code calling update() will now call invalidate(), which functions identically and is more obvious in what it does. Additionally, a default implementation is provided, which removes the need to add empty implementations of update() for each model subclass. Co-Authored-By: Ali Mohammad Pur <ali.mpfard@gmail.com>
2021-07-11TableView: Do not select input on keydownJelle Raaijmakers
In the Spreadsheet app, selecting a cell and typing something (like "1") would create an empty editing delegate, set "1" as its value and immediately select the entire contents of the text box. If your goal was to type "123", that "1" was selected and will be replaced by "23". This changes the behavior of TableView to not select the editing delegate's contents if its creation was a result of a keydown event.
2021-07-04Spreadsheet: Add function for moving cursorzawwwu
This function allows to access cursor movement functionality outside of SpreadsheetView class.
2021-06-17Spreadsheet: Do not cancel drag-select when moving over a cell cornerAli Mohammad Pur
Fixes #4277.
2021-05-31Spreadsheet: Keep value when clicking out of a cellBrandon Hamilton
2021-04-29Everywhere: "indexes" => "indices"Andreas Kling
I've wasted a silly amount of time in the past fretting over which of these words to use. Let's just choose one and use it everywhere. :^)
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-13Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"Andreas Kling
I hereby declare these to be full nouns that we don't split, neither by space, nor by underscore: - Breadcrumbbar - Coolbar - Menubar - Progressbar - Scrollbar - Statusbar - Taskbar - Toolbar This patch makes everything consistent by replacing every other variant of these with the proper one. :^)
2021-03-28LibGUI: Make GUI::Widget::event() protectedAndreas Kling
2021-03-24Spreadsheet: Ensure that cell exists on drop event for text dataDavid Isaksson
Fixes crash where we tried to get a cell to set text from the drop event. We now create the cell if it does not already exists. Fixes issue #5923
2021-03-22Spreadsheet: Only append new columns/rows every 50msAnotherTest
Fixes #5550.
2021-03-18Spreadsheet: Set default width for columnsthankyouverycool
2021-02-24Spreadsheet: Store the column index in a Position instead of its nameAnotherTest
This will make constructing (and destructing) Positions a lot cheaper (as it no longer needs to ref() and unref() a String). Resulted from #5483, but doesn't fix it.
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-01-12Applications: Move to Userland/Applications/Andreas Kling