Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CodenameOne/src/com/codename1/ui/plaf/LookAndFeel.java
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,19 @@ public int getFadeScrollBarSpeed() {

/// #### Parameters
///
/// - `fadeScrollBarSpeed`: the fadeScrollBarSpeed to set
/// - `fadeScrollBarSpeed`: per-frame opacity decrement used for fading the scrollbar.
/// Larger values fade out faster.
///
/// #### Notes
///
/// - This value is **not milliseconds**.
/// - Approximate fade duration in milliseconds:
/// `durationMs ~= (255 / fadeScrollBarSpeed) * (1000 / Display.getInstance().getFrameRate())`
/// - At 60 FPS, common values are:
/// - `5` -> about `850ms`
/// - `3` -> about `1400ms`
/// - `2` -> about `2100ms`
/// - `1` -> about `4250ms`
public void setFadeScrollBarSpeed(int fadeScrollBarSpeed) {
this.fadeScrollBarSpeed = fadeScrollBarSpeed;
}
Expand Down
3 changes: 3 additions & 0 deletions docs/developer-guide/Advanced-Theming.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ SoftKey, Touch, Bar, Title, Right, Native
|fadeScrollBarBool
|Boolean indicating if the scrollbar should fade when there is inactivity

|setFadeScrollBarSpeed(int) _(API)_
|Sets the per-frame opacity decrement for scrollbar fading (not milliseconds). Approximate fade duration is `durationMs ~= (255 / speed) * (1000 / frameRate)`. At 60 FPS: speed `5` ~= `850ms`, `3` ~= `1400ms`, `2` ~= `2100ms`, `1` ~= `4250ms`

|fadeScrollEdgeBool
|Places a fade effect at the edges of the screen to indicate that it's possible to scroll until we reach the edge (common on Android)

Expand Down
Loading