ProgressView spinner theming

- New SpinnerSettings which integrates with ThemeSettings
- Support infra around spinner theming
- Relates #995
This commit is contained in:
Janne Valkealahti
2024-02-04 14:56:55 +00:00
parent 95aaa865c5
commit abc4ffaaa3
7 changed files with 181 additions and 12 deletions

View File

@@ -133,7 +133,8 @@ public class ComponentUiCommands extends AbstractShellComponent {
@Command(command = "componentui progress2")
public void progress2() {
ProgressView view = new ProgressView(0, 100, ProgressViewItem.ofText(10, HorizontalAlign.LEFT),
ProgressView view = new ProgressView(0, 100,
ProgressViewItem.ofText(10, HorizontalAlign.LEFT),
ProgressViewItem.ofSpinner(3, HorizontalAlign.LEFT),
ProgressViewItem.ofPercent(0, HorizontalAlign.RIGHT));
view.setDescription("name");
@@ -154,4 +155,15 @@ public class ComponentUiCommands extends AbstractShellComponent {
runProgress(view);
}
@Command(command = "componentui progress4")
public void progress4() {
ProgressView view = new ProgressView();
view.setDescription("name");
view.setRect(0, 0, 20, 1);
view.setThemeResolver(getThemeResolver());
view.start();
runProgress(view);
}
}