aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/layout.cc7
-rw-r--r--test/html/manual/left-scrollbar.html15
2 files changed, 21 insertions, 1 deletions
diff --git a/dw/layout.cc b/dw/layout.cc
index 1784b139..f0a46fa8 100644
--- a/dw/layout.cc
+++ b/dw/layout.cc
@@ -2,7 +2,7 @@
* Dillo Widget
*
* Copyright 2005-2007 Sebastian Geerken <sgeerken@dillo.org>
- * Copyright 2024 Rodrigo Arias Mallo <rodarima@gmail.com>
+ * Copyright 2024-2025 Rodrigo Arias Mallo <rodarima@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -969,6 +969,11 @@ void Layout::resizeIdle ()
DBG_OBJ_SET_SYM ("canvasHeightGreater",
canvasHeightGreater ? "true" : "false");
containerSizeChanged ();
+
+ // We need to place the top level widget at an offset, so
+ // be sure that we allocate it with the new allocation.x
+ if (view->getScrollbarOnLeft())
+ topLevel->setFlags(Widget::NEEDS_ALLOCATE);
}
// Set viewport sizes.
diff --git a/test/html/manual/left-scrollbar.html b/test/html/manual/left-scrollbar.html
new file mode 100644
index 00000000..dfa0d2e5
--- /dev/null
+++ b/test/html/manual/left-scrollbar.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test text under left scrollbar</title>
+ <style>
+ body { width: 700px; height: 1000px; }
+ </style>
+ </head>
+ <body>
+ <p>
+ Can you read me?
+ <em>You must set the scrollbar_on_left=YES config option</em>
+ </p>
+ </body>
+</html>