mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 02:13:56 +09:00
LibWebView+UI: Handle DPR for select elements like other menus
The select dropdown was doing its own ad-hoc method of handling DPR. We now handle it just like other context menus. Previously, the drop down in the AppKit chrome was twice as large as it should be.
This commit is contained in:
parent
3961a4f16a
commit
9b6ae962d0
Notes:
github-actions[bot]
2025-03-22 16:29:25 +00:00
Author: https://github.com/trflynn89
Commit: 9b6ae962d0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4036
3 changed files with 3 additions and 4 deletions
|
@ -133,7 +133,7 @@ WebContentView::WebContentView(QWidget* window, RefPtr<WebView::WebContentClient
|
|||
|
||||
on_request_select_dropdown = [this](Gfx::IntPoint content_position, i32 minimum_width, Vector<Web::HTML::SelectItem> items) {
|
||||
m_select_dropdown->clear();
|
||||
m_select_dropdown->setMinimumWidth(minimum_width / device_pixel_ratio());
|
||||
m_select_dropdown->setMinimumWidth(minimum_width);
|
||||
|
||||
auto add_menu_item = [this](Web::HTML::SelectItemOption const& item_option, bool in_option_group) {
|
||||
QAction* action = new QAction(qstring_from_ak_string(in_option_group ? MUST(String::formatted(" {}", item_option.label)) : item_option.label), this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue