-
-
Notifications
You must be signed in to change notification settings - Fork 60
Fix/progess spinner resizing #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
ba361de
660f678
6879d40
c3bc981
4645c19
b0cc977
b615c3c
8927187
6d7049a
ea80229
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -541,6 +541,15 @@ public protocol AppBackend: Sendable { | |
| /// Creates an indeterminate progress spinner. | ||
| func createProgressSpinner() -> Widget | ||
|
|
||
| /// Changes the Spinner's Size. | ||
| /// Required due to AppKitBackend needing special treatment. | ||
| /// Forward to ``AppBackend/setSize(of widget: Widget, to size: SIMD2<Int>)`` | ||
| /// on other Backends. | ||
|
Comment on lines
+544
to
+547
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace these docs with the following. /// Sets the size of a progress spinner.
///
/// This method exists because AppKitBackend requires special handling to resize progress spinners.
///
/// The default implementation forwards to ``AppBackend/setSize(of:to:)``.I know that most of the other backend methods are just one big blob of text, but I'm planning on changing that soon, and I figured that given that I was already suggesting wording changes and fixing the symbol link, I might as well update it to the new formatting while I was at it. Putting the blank lines splits the documentation into multiple paragraphs. The first paragraph is the one that LSPs show, and it's the short blurb used in generated DocC documentation under symbol links I think. |
||
| func setProgressSpinnerSize( | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rename to |
||
| _ widget: Widget, | ||
| _ size: SIMD2<Int> | ||
| ) | ||
|
|
||
| /// Creates a progress bar. | ||
| func createProgressBar() -> Widget | ||
| /// Updates a progress bar to reflect the given progress (between 0 and 1), and the | ||
|
|
@@ -1028,6 +1037,13 @@ extension AppBackend { | |
| todo() | ||
| } | ||
|
|
||
| public func setProgressSpinnerSize( | ||
| _ widget: Widget, | ||
| _ size: SIMD2<Int> | ||
| ) { | ||
| setSize(of: widget, to: size) | ||
| } | ||
|
|
||
| public func createProgressBar() -> Widget { | ||
| todo() | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be removed. I assume it was probably just used to test for size animation when fixing the AppKitBackend issues?