Replace Old Widgets
This commit is contained in:
parent
03da5e41d6
commit
c41dc20132
81 changed files with 388 additions and 278 deletions
24
Widgets/public/layouts/ScrollableLayout.hpp
Normal file
24
Widgets/public/layouts/ScrollableLayout.hpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
|
||||
#include "Layout.hpp"
|
||||
|
||||
namespace tp {
|
||||
class ScrollableBarWidget;
|
||||
|
||||
class ScrollableLayout : public WidgetLayout {
|
||||
public:
|
||||
explicit ScrollableLayout(Widget* widget) :
|
||||
WidgetLayout(widget) {
|
||||
setSizePolicy(SizePolicy::Expanding, SizePolicy::Expanding);
|
||||
}
|
||||
|
||||
void updateLayout(bool vertical) override;
|
||||
[[nodiscard]] RectF getAvailableChildArea() const override;
|
||||
|
||||
private:
|
||||
void updateWidgetRects(const RectF& area, Widget* content, ScrollableBarWidget* scroller) const;
|
||||
|
||||
private:
|
||||
halnf mScrollerSize = 15;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue