mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-24 19:28:48 +00:00
parent
a0b44ff5e7
commit
85b424464a
Notes:
github-actions[bot]
2025-01-21 16:49:39 +00:00
Author: https://github.com/trflynn89
Commit: 85b424464a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3335
191 changed files with 574 additions and 574 deletions
|
@ -40,8 +40,8 @@ QSize TabBar::tabSizeHint(int index) const
|
|||
|
||||
void TabBar::contextMenuEvent(QContextMenuEvent* event)
|
||||
{
|
||||
auto* tab_widget = verify_cast<QTabWidget>(this->parent());
|
||||
auto* tab = verify_cast<Tab>(tab_widget->widget(tabAt(event->pos())));
|
||||
auto* tab_widget = as<QTabWidget>(this->parent());
|
||||
auto* tab = as<Tab>(tab_widget->widget(tabAt(event->pos())));
|
||||
if (tab)
|
||||
tab->context_menu()->exec(event->globalPos());
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ QRect TabStyle::subElementRect(QStyle::SubElement sub_element, QStyleOption cons
|
|||
{
|
||||
// Place our add-tab button (set as the top-right corner widget) directly after the last tab
|
||||
if (sub_element == QStyle::SE_TabWidgetRightCorner) {
|
||||
auto* tab_widget = verify_cast<TabWidget>(widget);
|
||||
auto* tab_widget = as<TabWidget>(widget);
|
||||
auto tab_bar_size = tab_widget->tabBar()->sizeHint();
|
||||
auto new_tab_button_size = tab_bar_size.height();
|
||||
return QRect {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue