Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change colour scroll-overflow indicators?

When the user scrolls to the edge of a list or TabView, an animated blue circle appears on the ending edge.

What is this called, and how do I change the colour of it?

Cheers.

like image 253
haz Avatar asked Apr 17 '18 11:04

haz


People also ask

Can you change the color of the scroll bar?

The scrollbar-color property is used to set the color of an element's scrollbar. It can be used to control both the scrollbar track and scrollbar thumb colors separately.

How do you change the scroll color on flutter?

You can use RawScrollbar instead and set the thumbColor to whatever color you like. Show activity on this post. Scroll bar uses the highlight color.. so just add ur desired scrollbar color in the highlightColor inside Theme in MaterialApp and you are done.

How to color the scrollbar with CSS?

The scrollbar-color CSS property sets the color of the scrollbar track and thumb. The track refers to the background of the scrollbar, which is generally fixed regardless of the scrolling position. The thumb refers to the moving part of the scrollbar, which usually floats on top of the track.

What color is scroll?

The hexadecimal color code #ebd78d is a medium light shade of yellow. In the RGB color model #ebd78d is comprised of 92.16% red, 84.31% green and 55.29% blue.

How does the overflow property work with scrollbars?

Note: The overflow property only works for block elements with a specified height. Note: In OS X Lion (on Mac), scrollbars are hidden by default and only shown when being used (even though "overflow:scroll" is set). By default, the overflow is visible, meaning that it is not clipped and it renders outside the element's box:

What do the different colors of the scrollbar mean?

The first color is for the “thumb” or the moveable part of the scrollbar which appears on top. The second color is for the “track” or the fixed portion of the scrollbar. This combines the new spec syntax and the WebKit prefixed stuff. This browser support data is from Caniuse, which has more detail.

What are the default scrollbar colors for user agent?

scrollbar-color accepts the following values: auto is the default value and will render the standard scrollbar colors for the user agent. dark will tell the user agent to use darker scrollbars to match the current color scheme. light will tell the user agent to use lighter scrollbars to match the current color scheme.

What is overflow in CSS?

CSS Overflow. The overflow property specifies whether to clip the content or to add scrollbars when the content of an element is too big to fit in the specified area. The overflow property has the following values: visible - Default.


1 Answers

This is the android scroll physics (ClampingScrollPhysics).

From the source code and docs:

glow color is specified to use [ThemeData.accentColor].

That been said, when you create your App, the best practice is to specify a custom theme, istead of appling colors manually.

Example:

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'My App',
      theme: ThemeData(
        brightness: Brightness.light,

        primarySwatch: Colors.grey,
        primaryColor: Colors.grey[50],
        primaryColorBrightness: Brightness.light,

        //this is what you want
        accentColor: Colors.orangeAccent[400],
        accentColorBrightness: Brightness.light,
      ),
      home: Home(),
    );
  }
}

I like to use this tool to define the primary and secondary (called accent color in flutter) and having a preview of the widgets.

Note: On IOs the physics is different, letting the user scroll beyond the bounds of the content, but then bounce the content back to the edge of those bounds (BouncingScrollPhysics).

like image 74
Ian Avatar answered Dec 03 '22 05:12

Ian