Commit graph

16 commits

Author SHA1 Message Date
fourtf 2db140d5af
Added x-attach-split-to-window command line arg (#2411)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2021-04-17 14:15:23 +00:00
fourtf 58017a7546
fix size of splits not loading properly (#2554) 2021-04-17 13:16:14 +00:00
pajlada 913193f8b5
Split up Window Layout loading into a loading and application stage (#1964)
* Split up Window Layout loading into a loading and application stage

Previously, we were creating UI elements at while we were reading the window-layout.json file.
We now read the window-layout.json file fully first, which results in a
WindowLayout struct which is built up of a list of windows with a list
of tabs with a root node which contains containers and splits.
This WindowLayout can then be applied.

This will enable PRs like #1940 to start Chatterino with Window Layouts
that aren't defined in a json file.

This commit has deprecated loading of v1 window layouts (we're now on v2). If a v1 window layout is there, it will just be ignored and Chatterino will boot up as if it did not have a window layout at all, and on save that old window layout will be gone.

* Fix compile error for mac
2020-09-19 17:14:10 +02:00
fourtf 28a0e4c63c Closes #1909 2020-08-23 17:04:17 +02:00
Leon Richardt a9080ceb3c
Discord-like Quick Switcher (#1588)
* Proof of Concept for Quick Switcher

* Fix crash when suggestions are empty

* QuickSwitcher: Use tab name instead of a single channel

* Rebase later

* Add missing include for <functional>

* Move QuickSwitcher related classes into own subfolder

* Refactor switcher list items

Now, items are responsible for taking the right action when selected in
the switcher list. This should allow for more focused code and
responsibilities.

* Add note about memory management

* Add option to open channel in a new tab

* Add support for using the mouse

* Spawn switcher popup in the middle of the window

Works reliably on i3 at least. Might need some additional testing on
other WMs (and especially on Windows!).

* Add some icons for switcher items

Note that the final design of the list is not final but I do plan to
incorporate these in the future.

* Set Qt::Dialog window flag on switcher popup

Prevents tiling window managers like i3 from trying to tile the window.

* Rename "SwitcherItem" to "AbstractSwitcherItem"

* Add comments about what items are inserted

* Use custom model and view

Still missing: Currently selected item is not highlighted yet. You can
move between selected items with tab and arrow keys though.

* Add helper function to convert QVariant to AbstractSwitcherItem *

* Remove useless constant

* Highlight currently selected switcher item

* Use a different method for centering QuickSwitcherPopup window

* QuickSwitcherModel: Add documentation

* Add default parameter to QuickSwitcherModel::rowCount

* QuickSwitcherPopup: Add comments

* Remove outdated TODO

* QuickSwitcherModel: Init vector with default capacity

* Remove outdated comment

* Add comment about 0 ms timeout interval

* NewTabItem: Simplify interface

* Only fetch opened splits once

This is better than the prior approach since opened splits cannot change
anyways while the switcher is open.

* Use SplitContainer to pass information instead of custom type

* Allow searching for tab titles as well

Before this commit, only channel names could be searched.

* Refactor switcher item interface to be more flexible

Also show tab name and channel name in the switcher list.

* Add documentation for AbstractSwitcherItem

* Add documentation for NewTabItem

* Add comments about {begin,end}{Insert,Remove}Rows

* Remove unused method

* Replace magic size with named constant

* Add change log entry

Co-authored-by: fourtf <tf.four@gmail.com>
2020-08-13 19:25:51 +02:00
fourtf 2c74e98023 edited split dropdown 2020-08-13 18:02:23 +02:00
Rasmus Karlsson 49449379da Added a Live status indicator to tabs 2018-10-13 14:20:06 +02:00
23rd 9a6650b56c Added button in menu to join to channel. (#724) 2018-09-21 20:35:14 +02:00
fourtf 1d682c4a93 added add split button 2018-09-04 21:39:54 +02:00
fourtf 44f5a15da3 turning a lot of includes into forward declares 2018-08-11 22:23:06 +02:00
fourtf 7a9af4ae84 moved menu code to ripple effect button 2018-08-07 23:46:00 +02:00
fourtf f71ff08e68 changed to 80 max column 2018-08-06 21:17:03 +02:00
fourtf 280bb4cf8e Renamed private members 2018-07-06 19:24:35 +02:00
fourtf 3303de18cd added double click to resize handle 2018-07-04 19:52:11 +02:00
fourtf 2df0566492 removed namespaces 2018-06-26 16:37:59 +02:00
fourtf 22f528cd21 put all split widgets inside the same directory 2018-06-26 14:39:22 +02:00
Renamed from src/widgets/SplitContainer.hpp (Browse further)