Skip to content

Commit

Permalink
Various widget tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Oct 11, 2023
1 parent 4d0682c commit 6213a70
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/widget/checkbox.h
Expand Up @@ -28,7 +28,7 @@
#include "lib/framework/vector.h"
#include <string>

struct WzCheckboxButton : public W_BUTTON
class WzCheckboxButton : public W_BUTTON
{
public:
WzCheckboxButton();
Expand Down
2 changes: 2 additions & 0 deletions lib/widget/margin.h
Expand Up @@ -54,6 +54,8 @@ class MarginWidget: public WIDGET

protected:
void geometryChanged() override;

public:
int32_t idealWidth() override;
int32_t idealHeight() override;

Expand Down
5 changes: 5 additions & 0 deletions lib/widget/scrollablelist.cpp
Expand Up @@ -178,7 +178,12 @@ void ScrollableListWidget::setSnapOffset(bool value)

void ScrollableListWidget::setItemSpacing(uint32_t value)
{
if (value == itemSpacing)
{
return;
}
itemSpacing = value;
layoutDirty = true;
}

void ScrollableListWidget::display(int xOffset, int yOffset)
Expand Down
1 change: 1 addition & 0 deletions lib/widget/scrollablelist.h
Expand Up @@ -54,6 +54,7 @@ class ScrollableListWidget : public WIDGET
void setSnapOffset(bool value);
void setBackgroundColor(PIELIGHT const &color);
void setItemSpacing(uint32_t value);
uint32_t getItemSpacing() const { return itemSpacing; }
uint32_t calculateListViewHeight() const;
uint32_t calculateListViewWidth() const;
void display(int xOffset, int yOffset) override;
Expand Down

0 comments on commit 6213a70

Please sign in to comment.