Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 800  / 2 Years ago, wed, july 27, 2022, 2:26:24

I'd like to resize a window inside an application but the edge I need to grab is hidden by overlay scrollbars. I don't want to completely disable overlay scrollbars, that's been asked and answered.



Here is a visual example illustrating the problem. The edge with the tiny markings indicating it can be grabbed and resized are hidden by the overlay scrollbars each time I move the mouse to it:



overlay-scrollbar-preventing-window-resize


More From » unity

 Answers
7

It works for me to position the mouse pointer just a little outside the border of the window (above the scrollbar), then move it a little up or down (in a straight line, until it is outside the scrollbar), then the resize icon appears.


Alternatively, you can wait a few seconds while keeping the mouse above the overlay scrollbar, the overlay scrollbar will disappear (fade away), the resize icon will appear.






Edit


Toggling between scroll modes with a shortcut key combination


Since you mentioned in a comment that toggling between scroll modes would be helpful, you can simply toggle the scrollbar mode to "normal" and back to "overlay" by putting the script below under a convenient key combination. It recognizes the current scrollbar mode, and switches between "normal" and "overlay-auto".


How to use



  1. Copy the script below into an empty file, save it as toggle_scrollbar.py



  2. Test the script by running it from a terminal window with the command:


     python3 /path/to/toggle_scrollbar.py


  3. If all works fine, make it available under a shortcut key combination: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command.




The script:


#!/usr/bin/env python3
import subprocess

get = lambda cmd: subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8").strip()
def set_value(cmd):
subprocess.Popen(["/bin/bash", "-c", cmd])

if get("gsettings get com.canonical.desktop.interface scrollbar-mode") != "'normal'":
cmd = "gsettings set com.canonical.desktop.interface scrollbar-mode 'normal'"
else:
cmd = "gsettings set com.canonical.desktop.interface scrollbar-mode 'overlay-auto'"

set_value(cmd)

[#20938] Thursday, July 28, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
otatorm

Total Points: 218
Total Questions: 113
Total Answers: 124

Location: British Indian Ocean Territory
Member since Tue, Feb 22, 2022
2 Years ago
;