mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibGUI: Add UIDimension and UISize types
These types are used to represent size information for layouts. They can hold integer (int) values ≥0 or special values like shrink and fit.
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 09:55:37 +09:00
Author: https://github.com/frhun Commit: https://github.com/SerenityOS/serenity/commit/024305e742 Pull-request: https://github.com/SerenityOS/serenity/pull/14261 Reviewed-by: https://github.com/AtkinsSJ ✅ Reviewed-by: https://github.com/MacDue Reviewed-by: https://github.com/mjz19910
@@ -75,8 +75,8 @@ void AbstractScrollableWidget::mousewheel_event(MouseEvent& event)
|
||||
void AbstractScrollableWidget::custom_layout()
|
||||
{
|
||||
auto inner_rect = frame_inner_rect_for_size(size());
|
||||
int height_wanted_by_horizontal_scrollbar = m_horizontal_scrollbar->is_visible() ? m_horizontal_scrollbar->min_height() : 0;
|
||||
int width_wanted_by_vertical_scrollbar = m_vertical_scrollbar->is_visible() ? m_vertical_scrollbar->min_width() : 0;
|
||||
int height_wanted_by_horizontal_scrollbar = m_horizontal_scrollbar->is_visible() ? int(m_horizontal_scrollbar->min_height()) : 0;
|
||||
int width_wanted_by_vertical_scrollbar = m_vertical_scrollbar->is_visible() ? int(m_vertical_scrollbar->min_width()) : 0;
|
||||
|
||||
m_vertical_scrollbar->set_relative_rect(
|
||||
inner_rect.right() + 1 - m_vertical_scrollbar->min_width(),
|
||||
|
||||
Reference in New Issue
Block a user