summaryrefslogtreecommitdiffstats
path: root/source/widgets/scrollbar.c
diff options
context:
space:
mode:
authorDave Davenport <DaveDavenport@users.noreply.github.com>2020-04-24 19:54:08 +0200
committerGitHub <noreply@github.com>2020-04-24 19:54:08 +0200
commit151547a99ed142168ec4a11e526102994f6736a9 (patch)
tree523506cae7120bc80c1234c94c1f0a4e1cd66bc6 /source/widgets/scrollbar.c
parentf90ad971d9d334b26280fbf14dda700877f75d67 (diff)
[Themes] add calc() support to distance in theme format. (#1105)
* Initial test to allow math in distances. Support + and - Needs spaces around + and -. * [THEME] Fix printing theme with math in distance. * [Theme] use calc() syntax. * [Theme] Add * and / to calc(). * [Theme] Fix the precedense ordering in parsing. Also avoid making copies. * [Theme] Don't print unneeded (). * [Theme] Add modulo to calc.
Diffstat (limited to 'source/widgets/scrollbar.c')
-rw-r--r--source/widgets/scrollbar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/widgets/scrollbar.c b/source/widgets/scrollbar.c
index dd057591..699ab07e 100644
--- a/source/widgets/scrollbar.c
+++ b/source/widgets/scrollbar.c
@@ -51,7 +51,7 @@ static int scrollbar_get_desired_height ( widget *wid )
// This should behave more like a real scrollbar.
guint scrollbar_scroll_get_line ( const scrollbar *sb, int y )
{
- y -= sb->widget.border.top.distance;
+ y -= sb->widget.border.top.base.distance;
if ( y < 0 ) {
return 0;
}