1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-23 10:42:11 +02:00
Commit Graph

201 Commits

Author SHA1 Message Date
David Rosca
84c4f0ff4d TabBar: Don't show context menu when dragging tab
Otherwise it breaks tabbar state.
2018-01-11 19:45:41 +01:00
David Rosca
78383c007e TabBar: Always send mouse events to ComboTabBar
It needs every event to correctly update dragInProgress property.
2018-01-11 19:45:36 +01:00
David Rosca
4e988ac8f2 ComboTabBar: Fixes in drawing tabs with drag offset
m_dragInProgress is now only true when dragging tab, not during
the tab sliding to target position animation.
2018-01-11 19:45:32 +01:00
David Rosca
6a48f4d862 TabBar: Disable greying out not restored tabs
It doesn't really work with some themes and there doesn't seem
to be easy way to make the text always clearly visible.
2018-01-11 19:45:27 +01:00
David Rosca
4c7eaf0f9f ComboTabBar: Add support for tabPadding property
Workarounds bug where tabs have zero padding when styled using style
sheets.
2018-01-11 19:44:50 +01:00
David Rosca
e617f3f6ec ComboTabBar: Fix drop indicator position on last tab 2018-01-11 19:44:45 +01:00
David Rosca
679a5f0136 ComboTabBar: Also use our TabBarHelper drawing code when drag is in progress 2018-01-11 19:44:40 +01:00
David Rosca
47ee7bfbca TabWidget: Set outside-tabbar property to both add tab buttons
It is now possible to exclusively distinguish both buttons.
2018-01-11 19:43:38 +01:00
David Rosca
7e8b2a103b ComboTabBar: Draw tab as only one in tabbar in tabPixmap 2018-01-11 19:43:33 +01:00
David Rosca
848a61440c TabWidget: Hide closed tabs button when there are no closed tabs 2018-01-11 19:42:46 +01:00
David Rosca
4c494ebfb0 ComboTabBar: Improve drop indicator drawing
Code was taken and modified from KFilePlacesView
2018-01-11 19:31:41 +01:00
David Rosca
65d1493f0a Fix closing tabs - regression from last commits
Closes #2534
2018-01-11 19:25:48 +01:00
David Rosca
5cc41d219e Always open new window when restoring session after crash
Also remove special handling for qupzilla:restore tabs.
2018-01-11 19:23:36 +01:00
David Rosca
679268dbd1 ClosedTabsManager: Move check for saving restore tab from TabWidget 2018-01-11 19:22:43 +01:00
David Rosca
f2002892aa Save previous crashed session that were not restored to session file
Closes #2331
2018-01-11 19:21:17 +01:00
David Rosca
c97d077f67 TabBar: Make updatePinnedTabCloseButton private
It is no longer needed to call it after changing tab pinned state.
2018-01-11 19:19:04 +01:00
David Rosca
5013053811 TabBar: Reject drags from other app instances 2018-01-02 22:57:26 +01:00
David Rosca
7b6b69c35f TabBar: Fix dropping text/url to tabs 2018-01-02 15:03:27 +01:00
David Rosca
b3bd08c5e4 BrowserWindow: Add SavedWindow struct and use it for saving/restoring 2018-01-02 15:01:16 +01:00
David Rosca
16fcae4202 ClosedTabsManager: Rewrite to use WebTab::SavedTab 2018-01-02 14:59:06 +01:00
David Rosca
90153e280e Fix build 2018-01-01 17:10:44 +01:00
David Rosca
8817493c68 Tabs: Allow to detach tab from window with only one tab
Window will be closed after detaching this tab.
2018-01-01 17:01:41 +01:00
David Rosca
3eac8bd161 TabContextMenu: Remove detach tab action
Tabs can now be detached with drag&drop
2018-01-01 17:01:19 +01:00
David Rosca
38bfd49d4f TabBar: Change mimetype to falkon 2018-01-01 17:00:42 +01:00
David Rosca
fb652ff6cd Tabs: Make the code work better with zero tabs 2018-01-01 16:59:52 +01:00
David Rosca
21ca9adf6b TabBar: Add support for drag&drop tabs to other windows
Also it is possible to detach tab by dragging it outside of tabbar.

BUG: 386672
2018-01-01 16:58:47 +01:00
David Rosca
fe396e64ff ComboTabBar: Add tabPixmap method to render single tab 2018-01-01 16:58:16 +01:00
David Rosca
08c0b480c1 ComboTabBar: Fix clearing drop marker when moving from main to pinned tabbar 2018-01-01 16:58:09 +01:00
David Rosca
f5ad4424aa TabWidget: Add insertView method for WebTab 2018-01-01 16:58:02 +01:00
David Rosca
c679fdf397 TabBar: Add support for droping text/url inside tabbar to insert new tab 2018-01-01 16:57:03 +01:00
David Rosca
246adbfb0b ComboTabBar: Add support for drawing drop indicator
It's just a solid line now, should be improved later.
2018-01-01 16:56:58 +01:00
David Rosca
4fb73f3840 ComboTabBar: Fix edge case in tabAt
Right corner of pinned tabbar would incorrectly return tabs from main tabbar.
Also make it work on close button.
2018-01-01 16:56:52 +01:00
David Rosca
8100020b41 TabBar: Support dropping text on tabs
It will be searched for using default search engine
2018-01-01 16:56:47 +01:00
David Rosca
c7d58017d2 AddTabButton: Remove handling of drop events
It is handeld by the TabBar itself.
2018-01-01 16:56:39 +01:00
David Rosca
ca04e9d967 TabBar: Support adding new tabs with text drop data
Urls are loaded directly and text is searched for using default search
engine.
2018-01-01 16:56:32 +01:00
David Rosca
373df431a7 TabWidget: Switch to newly created tab when duplicating tab 2018-01-01 16:56:26 +01:00
Razi Alavizadeh
8086e46ca4 ComboTabBar: Fix duplicate call to slotCurrentChanged() when closing tab.
- The issue occurred after 04b288b395
- See https://github.com/QupZilla/qupzilla/issues/2489
2017-10-22 20:00:06 +03:30
Razi Alavizadeh
991fb32cc3 Fix restoring state of current tab after restoring last session.
- After 04b288b3 WebTab does not restore its state on showEvent
- QupZilla issue: https://github.com/QupZilla/qupzilla/issues/2467
2017-10-06 19:35:54 +03:30
Razi Alavizadeh
bad3a76a2e TabManager: Don't repeat detaching tab code. 2017-10-03 17:02:30 +03:30
Razi Alavizadeh
f17eb82cf9 TabManager: Add tab context-menu to treewidget context-menu. 2017-10-03 17:02:26 +03:30
Razi Alavizadeh
04b288b395 Fix restoring non-loaded tabs when moving them. 2017-10-03 17:02:25 +03:30
Razi Alavizadeh
f041d87534 Move tab context-menu methods to TabContextMenu. 2017-10-03 17:02:24 +03:30
Luigi Toscano
3c67be06b9 Fix UI strings with plural forms
Otherwise those strings can not be extracted.
2017-09-26 01:37:46 +02:00
David Rosca
efff69b7b2 Continue with Falkon renaming 2017-08-25 17:55:52 +02:00
David Rosca
d00e769749 Initial rename to Falkon 2017-08-25 17:32:32 +02:00
David Rosca
67c6834a5f ComboTabBar: Disable focusing scroll buttons 2017-08-12 15:56:26 +02:00
David Rosca
3492999abe Don't return empty QByteArray when there are no tabs in session 2017-04-07 12:38:54 +02:00
David Rosca
cb4012c5c9 Don't save qupzilla:restore tabs in sessions 2017-04-07 12:36:42 +02:00
srazi
2654081912 Fix 2178 (#2292)
* CheckBoxDialog: Rewritten to inherit from QMessageBox

-  QMessageBox supports showing checkbox for Qt >= 5.2

* Add option to disable warning message when closing tabs from tabbar context menu.

- Closes #2178
2017-04-05 10:27:03 +02:00
David Rosca
e150e44cc6 Replace Q_OS_MAC with Q_OS_MACOS 2017-02-10 19:00:58 +01:00
David Rosca
5873ed48fd TabIcon: Hide icon immediately when url is empty or has qupzilla: scheme 2017-02-07 10:41:37 +01:00
David Rosca
bcb633fcd0 TabBar: Use correct duration for showing add tab button after releasing dragged tab 2017-01-28 10:31:45 +01:00
David Rosca
8ba412e584 ComboTabBar: Add setFocusPolicy
TabBar is setting Qt::NoFocus policy which was ignored
2017-01-27 16:51:45 +01:00
David Rosca
74740ef441 ComboTabBar: Make wheel scrolling faster 2017-01-27 15:43:21 +01:00
David Rosca
2d90afc503 TabBar: Don't return -1 when not visible in pixelMetric
Fixes tabs sometimes being invisible when leaving fullscreen

Correct fix for #1967
2017-01-27 15:34:29 +01:00
David Rosca
6525410e22 ComboTabBar: Fix drawing with correct selectedPosition 2017-01-27 14:24:39 +01:00
David Rosca
4e1a9079f3 ComboTabBar: Set QStyleOptionTabBarBase::selectedTabRect
Closes #1389
2017-01-27 14:06:06 +01:00
David Rosca
6132bf7789 ComboTabBar: Fix using correct value for tab animation duration 2017-01-27 14:00:09 +01:00
David Rosca
060011e466 Use qMax and qAbs instead of std functions
Closes #2169
2017-01-21 21:23:36 +01:00
David Rosca
5cc7dd080e Fix scrolling with high resolution mouse/touchpads
Use helper class to accumulate "common steps" of 120 angle delta.
2017-01-21 12:23:53 +01:00
David Rosca
9082c32bae TabBar: Change close action text to "Close Tab" in context menu 2017-01-21 12:22:07 +01:00
David Rosca
a6988ee8f1 TabIcon: Draw small dot in corner when there is activity in pinned tab 2017-01-20 15:09:57 +01:00
David Rosca
29bccf9984 Use Qt Windows Extras instead of custom QtWin 2017-01-20 09:58:13 +01:00
David Rosca
89ff7ca10a TabIcon: Show audio tooltip only when mouse is over audio icon 2017-01-02 15:29:56 +01:00
David Rosca
20abaaf9f9 TabIcon: Draw audio icon in topright corner for pinned tabs 2017-01-02 13:31:22 +01:00
David Rosca
9bceb3f8b3 TabIcon: Draw audio icon on top of site icon for pinned tabs 2017-01-01 21:34:45 +01:00
David Rosca
bccf2943cd TabIcon: Always show icon when tab is pinned 2016-12-31 17:23:06 +01:00
David Rosca
68e0425bde Hide tab icon when page icon is null
Completely hide the tab icon instead of showing generic webpage icon
when page icon is null.
2016-12-30 17:16:30 +01:00
David Rosca
6afc433ac8 Another HighDPI icons 2016-12-30 16:04:37 +01:00
David Rosca
dfa0533de0 TabsMenu: Indicate current tab with bold font + don't list pinned tabs
Also remove number of opened tabs
2016-12-29 15:05:38 +01:00
David Rosca
f2f9e1a6c3 Signal change when tab is (un)pinned and moved 2016-12-27 18:54:17 +01:00
David Rosca
e9b226d477 Drop support for pinned tabs without saving session
Pinned tabs are saved alongside normal tabs in a session file.
If user don't have session restore enabled, pinned tabs are saved
and restored from a special pinnedtabs.dat file which uses different
codepath.
It has also another problem that it only saves pinned tabs for last
browser window, which sometimes may be confusing and lead to losing
the pinned tabs.
2016-12-27 18:40:20 +01:00
David Rosca
e15bcc9215 Fix restoring zoom level of tabs 2016-12-27 18:40:13 +01:00
David Rosca
2349ca8912 ComboTabBar: Disable focus for scroll area 2016-12-26 15:18:34 +01:00
David Rosca
9f20772238 TabBar: Fix scrolling to current tab after session restore 2016-12-26 14:35:25 +01:00
David Rosca
2eb0308f6f TabBar: Reorganize the context menu a little
Remove the "Bookmark this tab" action, move "Open closed tab" at
the bottom and show "New tab" only when clicking at empty space.
2016-10-25 19:24:47 +02:00
David Rosca
3e4941ef0b TabIcon: Make the shared pixmaps static 2016-10-25 18:09:34 +02:00
David Rosca
fcc47ea914 TabIcon: Replace the favicon with audio icon when tab is playing audio
Also add tooltip to the audio icon
2016-10-25 17:59:27 +02:00
David Rosca
38bf9d2b4a Use QWebEngineView::icon() instead of custom icon downloading 2016-10-24 21:19:27 +02:00
David Rosca
cf3fa88942 Require Qt 5.7 2016-10-24 20:11:50 +02:00
std46
e906f6ae20 Issue #2049 close tabs to right & close tabs to left (#2062)
* add close to right menu 
Closes #2049
2016-08-28 16:24:09 +02:00
David Rosca
5085111657 Merge branch 'v2.0' 2016-08-15 14:51:19 +02:00
David Rosca
4c7735139e ComboTabBar:: Call ensureVisible only after resize event is processed
Also change delay to call ensureVisible after current tab is changed
to 100ms
2016-08-15 14:47:30 +02:00
David Rosca
1a183e590b Merge branch 'v2.0' 2016-08-15 14:25:26 +02:00
David Rosca
42eadaeb2f Fix scrolling to current tab when added from fullscreen mode 2016-08-15 14:25:01 +02:00
Vlad
9ae6c12a3c Show navigation in new tab in fullscreen mode (#2055) 2016-08-15 14:24:35 +02:00
David Rosca
648090d167 Fix warning about converting double to int 2016-08-15 14:24:27 +02:00
Vlad
8e12480dc9 Show navigation in new tab in fullscreen mode (#2055) 2016-08-15 13:54:54 +02:00
David Rosca
74417d8f36 Fix warning about converting double to int 2016-08-05 10:51:00 +02:00
Vlad
134737afda Implement audio mute for webtabs (#2019) 2016-08-05 10:50:50 +02:00
David Rosca
4cb62b73fb TabBar: Don't calculate tabSizeHint only when window is invisible
Fixes issue with tabbar sometimes having 1px height when leaving fullscreen.

Closes #1967
2016-07-10 16:34:05 +02:00
David Rosca
f93ea0e199 Fix use of deprecated QStyleOptions 2016-04-24 10:49:54 +02:00
David Rosca
f46364bc55 Fix typo changeOcurred -> changeOccurred 2016-02-26 10:43:34 +01:00
Vladislav Tronko
3f3f9eb428 Fix tabwidget signals connect 2016-02-15 20:34:20 +02:00
David Rosca
3e3da5909d TabIcon: Don't delay start of loading animation 2016-02-14 11:17:36 +01:00
David Rosca
779292713f ComboTabBar: Add small space between pinned and main tabbar 2016-01-31 12:37:02 +01:00
David Rosca
732e0ec94e TabIcon: Fix rendering for Qt 5.6 HighDPI 2016-01-27 12:26:30 +01:00
David Rosca
ac792de566 TabBar: Improve logic to calculate pinned tab width 2016-01-25 13:33:05 +01:00
David Rosca
ace8c9702b TabIcon: Set the same size as close button
Some styles calculates the height of tabs from displayed tab buttons,
so if the close tab is not visible, it would render the tabs smaller.
2016-01-25 12:51:05 +01:00
David Rosca
f9359da446 Fix some warnings when starting with new profile 2016-01-24 16:37:31 +01:00