Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
feat: migrate to LCUI 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Feb 29, 2020
1 parent ee38c3c commit e7e0ace
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion demo/src/ui/views/navbar.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ void Navbar_Init(void)
btn = LCUIWidget_GetById(BTN_CHANGE_SCALE);
dropdown = LCUIWidget_GetById(DROPDOWN_SCALE);
Widget_BindEvent(dropdown, "change.dropdown", OnChangeScale, btn, NULL);;

}
6 changes: 3 additions & 3 deletions src/ui/components/spinner.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#define SmoothLeftPixel(PX, X) (uchar_t)((PX)->a * (1.0 - (X - 1.0 * (int)X)))
#define SmoothRightPixel(PX, X) (uchar_t)((PX)->a * (X - 1.0 * (int)X))


typedef enum SpinnerType { SPINNER_DEFAULT, SPINNER_RING } SpinnerType;

typedef struct SpinnerRec_ {
Expand Down Expand Up @@ -199,7 +198,8 @@ static void Spinner_OnDestroy(LCUI_Widget w)
LCUITimer_Free(spinner->timer);
}

static void Spinner_AutoSize(LCUI_Widget w, float *width, float *height)
static void Spinner_AutoSize(LCUI_Widget w, float *width, float *height,
LCUI_LayoutRule rule)
{
float scale = LCUIMetrics_GetScale();
Spinner spinner = Widget_GetData(w, spinner_module.proto);
Expand All @@ -223,7 +223,7 @@ static void Spinner_OnUpdateStyle(LCUI_Widget w)
spinner->line_width = max(2, spinner->size / 8);
spinner->color = style.color;
CSSFontStyle_Destroy(&style);
Widget_UpdateSize(w);
Widget_AddTask(w, LCUI_WTASK_REFLOW);
}

static void Spinner_OnSetAttribute(LCUI_Widget w, const char *name,
Expand Down

0 comments on commit e7e0ace

Please sign in to comment.