mirror-chatterino2/src/widgets
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
..
dialogs Discord-like Quick Switcher (#1588) 2020-08-13 19:25:51 +02:00
helper updated descriptions in notification settings 2020-08-13 17:36:45 +02:00
settingspages fixed typo 2020-08-13 19:13:06 +02:00
splits Discord-like Quick Switcher (#1588) 2020-08-13 19:25:51 +02:00
AccountSwitchPopup.cpp Remove FMT dependency (#1472) 2020-01-03 20:51:37 +01:00
AccountSwitchPopup.hpp adjusted size of user switch popup 2019-09-08 12:43:12 +02:00
AccountSwitchWidget.cpp Update to latest settings library version 2018-11-03 13:00:07 +01:00
AccountSwitchWidget.hpp removed namespaces 2018-06-26 16:37:59 +02:00
AttachedWindow.cpp fix: Crash on MS Edge browser ext connection (#1852) 2020-08-13 14:53:36 +02:00
AttachedWindow.hpp Improve Chatterino extension positioning (#1825) 2020-08-01 15:42:56 +02:00
BasePopup.cpp Add a "BasePopup" class, which helps add default functionality to any popups (like the search popup) 2019-12-14 12:58:15 +01:00
BasePopup.hpp Add a "BasePopup" class, which helps add default functionality to any popups (like the search popup) 2019-12-14 12:58:15 +01:00
BaseWidget.cpp added checks to mitigate floating point crashes 2020-04-19 21:05:40 +02:00
BaseWidget.hpp removed appbase directory 2019-10-07 15:46:41 +02:00
BaseWindow.cpp BaseWindow: Make sure windowTopMost signal is attached to our list of managed connections 2020-06-14 12:26:23 +02:00
BaseWindow.hpp improve tooltips by only positioning the element once we know it's in… (#1693) 2020-05-24 11:51:16 +02:00
Label.cpp added checks to mitigate floating point crashes 2020-04-19 21:05:40 +02:00
Label.hpp removed appbase directory 2019-10-07 15:46:41 +02:00
Notebook.cpp Vertical tabs (#1815) 2020-08-13 15:43:08 +02:00
Notebook.hpp Vertical tabs (#1815) 2020-08-13 15:43:08 +02:00
Scrollbar.cpp fix typo (#1675) 2020-05-07 00:21:08 +02:00
Scrollbar.hpp Clear highlights scrollbar with messages. 2018-09-02 03:02:12 +03:00
StreamView.cpp Normalize line endings in already existing files 2019-09-08 22:27:57 +02:00
StreamView.hpp Normalize line endings in already existing files 2019-09-08 22:27:57 +02:00
TooltipWidget.cpp Simplify Tooltip flags on Linux for Sway (#1824) 2020-07-25 15:00:12 +02:00
TooltipWidget.hpp renamed getInstance() -> instance() for singletons 2019-10-07 22:42:34 +02:00
Window.cpp Discord-like Quick Switcher (#1588) 2020-08-13 19:25:51 +02:00
Window.hpp Added Preferences item in menu bar for OS X. 2019-06-10 12:43:37 +02:00