Repository: qutebrowser/qutebrowser

Issue:
hints.border affects padding
```
Version info
qutebrowser v1.6.0
Git commit: 
Backend: QtWebEngine (Chromium 69.0.3497.128)

CPython: 3.7.2
Qt: 5.12.1
PyQt: 5.12

sip: 4.19.14
colorama: 0.4.1
pypeg2: 2.15
jinja2: 2.10
pygments: 2.3.1
yaml: 3.13
cssutils: 1.0.2 $Id$
attr: 18.2.0
PyQt5.QtWebEngineWidgets: yes
PyQt5.QtWebKitWidgets: yes
pdf.js: no
sqlite: 3.27.2
QtNetwork SSL: OpenSSL 1.1.1b  26 Feb 2019

Style: QStyleSheetStyle
Platform: Linux-4.20.17-1-MANJARO-x86_64-with-arch-Manjaro-Linux, 64bit
Linux distribution: Manjaro Linux (manjaro)
Frozen: False
Imported from /usr/lib/python3.7/site-packages/qutebrowser
Using Python from /usr/bin/python3
Qt library executable path: /usr/lib/qt/libexec, data path: /usr/share/qt

Paths:
cache: /home/xxx/.cache/qutebrowser
config: /home/xxx/.config/qutebrowser
data: /home/xxx/.local/share/qutebrowser
runtime: /run/user/1000/qutebrowser
system data: /usr/share/qutebrowser

Uptime: 0:19:23
Yank pastebin URL for version info
Copyright info
Copyright 2014-2019 Florian Bruhin (The Compiler)

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 the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ or open qute://gpl.
```

**Does the bug happen if you start with `--temp-basedir`?**:
Yes

**Description**
When lowering the border value (down to 1 or 0) the hints are cropped.

Here's my config.py for reference : 
```
#Loading the Autoconfig file for other settings
#config.load_autoconfig()
c.auto_save.session = True
c.bindings.key_mappings = { '<Ctrl+Enter>': '<Ctrl+Return>', '<Enter>': '<Return>' }
c.colors.hints.fg = '#EEDD77'
c.colors.hints.bg = '#111111'
c.colors.hints.match.fg = '#00FF00'
c.colors.keyhint.fg = '#FFFFFF'
c.colors.keyhint.suffix.fg = '#00FF00'
c.colors.keyhint.bg = 'rgba(0, 0, 0, 75%)'
c.colors.tabs.bar.bg = '#444466'
c.content.autoplay = False
c.content.windowed_fullscreen = True
c.content.host_blocking.enabled = True
c.content.plugins = True
c.content.xss_auditing = True
c.completion.web_history.max_items = -1 
c.downloads.location.suggestion = 'both'
c.downloads.position = 'bottom'
c.fonts.completion.entry = '10pt monospace'
c.fonts.hints = 'bold 11pt monospace'
c.hints.border = '0px solid #EEDD77'
#c.hints.chars = 'qsdfghjklm'
c.hints.chars = 'azertyuiopqsdfghjklmwxcvbn'
c.hints.uppercase = False
#c.keyhint.delay = 250
c.scrolling.smooth = True
c.tabs.position = 'left'
c.tabs.select_on_remove = 'last-used'
c.tabs.last_close = 'close'
c.tabs.favicons.scale = 1.0
c.tabs.width = '8%'
###############################
#Cleaning up previous bindings#
###############################
strUBindList=["M","m",'<Ctrl+h>']
#,"mo","mO","mm","mM","mp","mP","mù","m%","mv","mV",'<Ctrl+b>','<Alt+b>','ta','tA','gM','<Escape>','<Ctrl+j>','<Ctrl+k>','<Ctrl+l>','<Ctrl+x>','ys','<Alt+&>','<Alt+é>','<Alt+">',"<Alt+'>",'<Alt+(>','<Alt+->','<Alt+è>','<Alt+_>','<Alt+ç>','<Alt+à>'
for strUBind in strUBindList:
    config.unbind(strUBind)
###############################

##########################################
#Open videos with Streamlink, MPV and VLC#
##########################################
#MPV Best quality
config.bind('mo','hint links spawn mpv {hint-url} --title=\"${media-title} - Qutebrowser\" --force-window=yes')
config.bind('mO','spawn mpv {url:pretty} --title=\"${media-title} - Qutebrowser\" --force-window=yes')
#MPV 1080
config.bind('mm','hint links spawn mpv --ytdl-format=bestvideo[height<=1080]+bestaudio {hint-url} --title=\"${media-title} - Qutebrowser\" --force-window=yes')
config.bind('mM','spawn mpv --ytdl-format=bestvideo[height=1080]+bestaudio {url:pretty} --title=\"${media-title} - Qutebrowser\" --force-window=yes')
#MPV low quality
config.bind('mp','hint links spawn mpv --ytdl-format=bestvideo[height=480]+bestaudio {hint-url} --title=\"${media-title} - Qutebrowser\" --force-window=yes')
config.bind('mP','spawn mpv --ytdl-format=bestvideo[height=480]+bestaudio {url:pretty} --title=\"${media-title} - Qutebrowser\" --force-window=yes')
#Streamlink
config.bind('mù','hint links spawn streamlink {hint-url}')
config.bind('m%','spawn streamlink {url:pretty}')
#VLC
#config.bind('mv','hint links spawn vlc.exe {hint-url} --input-title-format="Qutebrowser"')
#config.bind('mV','spawn vlc.exe {url:pretty} --input-title-format="Qutebrowser"')
##########################################
 
##################################################
#Remapping the number keys to fit a French layout#
##################################################
config.bind('<Alt+&>','tab-focus 1')
config.bind('<Alt+é>','tab-focus 2')
config.bind('<Alt+">','tab-focus 3')
config.bind("<Alt+'>",'tab-focus 4')
config.bind('<Alt+(>','tab-focus 5')
config.bind('<Alt+->','tab-focus 6')
config.bind('<Alt+_>','tab-focus 8')
config.bind('<Alt+è>','tab-focus 7')
config.bind('<Alt+ç>','tab-focus 9')
config.bind('<Alt+à>','tab-focus 10')
##################################################
#Opening Bookmarks
config.bind('<Ctrl+b>','set-cmd-text -s :bookmark-load')
config.bind('<Alt+b>','set-cmd-text -s :bookmark-load -t')
#Toggling adblock settings
config.bind('ta',r'config-cycle -t -p content.host_blocking.enabled ;; reload')
config.bind('tA',r'config-cycle -p content.host_blocking.enabled ;; reload')
#Binding gM to move tab to last place
config.bind('gM','tab-move ;; tab-move -')
config.bind('gD','hint all download')
#Ctrl H/J/K/L to scroll a page in their respective directions with a little slack for headers and footers
config.bind('<Ctrl+j>','scroll-page 0 0.93')
config.bind('<Ctrl+k>','scroll-page 0 -0.93')
config.bind('<Ctrl+h>','scroll-page -0.93 0')
config.bind('<Ctrl+l>','scroll-page 0.93 0')
#Rebinding the shortcut to open completed download as the old one is depreciated or inexistant?
config.bind('<Ctrl+x>','download-open')
#Yank selected text in normal mode
config.bind('ys','yank selection')
config.bind('yi','hint images yank')
##########################
# Giving and Taking tabs #
##########################
config.bind('!g','tab-give') 
config.bind('!t1','set-cmd-text :tab-take 0/')
config.bind('!t2','set-cmd-text :tab-take 1/')
config.bind('!t3','set-cmd-text :tab-take 2/')
config.bind('!to','set-cmd-text :tab-take ')
####################
#Command mode binds#
####################
#Unbinding#
###########
strUBindCommandMList=['<Tab>','<Shift-Tab>','<Ctrl-Tab>','<Ctrl-Shift-Tab>','<Up>','<Down>']
for strUBindCommand in strUBindCommandMList:
    config.unbind(strUBindCommand,mode='command')
##########

config.bind('<Ctrl-Space>','rl-unix-line-discard',mode='command')
#
config.bind('<Ctrl+k>','command-history-prev',mode='command')
config.bind('<Ctrl+h>','rl-backward-kill-word',mode='command')
config.bind('<Ctrl+j>','command-history-next',mode='command')
config.bind('<Ctrl+l>','rl-kill-word',mode='command')
#
config.bind('<Alt+k>','completion-item-focus --history prev',mode='command')
config.bind('<Alt+h>','completion-item-focus prev-category',mode='command')
config.bind('<Alt+j>','completion-item-focus --history next',mode='command')
config.bind('<Alt+l>','completion-item-focus next-category',mode='command')
```


**How to reproduce**
In your config.py 

`c.hints.border = '0px solid #EEDD77'`



Discussion:

Resolving patch:
diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py
--- a/qutebrowser/browser/hints.py
+++ b/qutebrowser/browser/hints.py
@@ -65,24 +65,14 @@ class HintLabel(QLabel):
         _context: The current hinting context.
     """
 
-    STYLESHEET = """
-        QLabel {
-            background-color: {{ conf.colors.hints.bg }};
-            color: {{ conf.colors.hints.fg }};
-            font: {{ conf.fonts.hints }};
-            border: {{ conf.hints.border }};
-            padding-left: -3px;
-            padding-right: -3px;
-        }
-    """
-
     def __init__(self, elem, context):
         super().__init__(parent=context.tab)
         self._context = context
         self.elem = elem
 
         self.setAttribute(Qt.WA_StyledBackground, True)
-        config.set_register_stylesheet(self)
+        # Zero out extra indent provided.
+        self.setIndent(0)
 
         self._context.tab.contents_size_changed.connect(self._move_to_elem)
         self._move_to_elem()
diff --git a/qutebrowser/mainwindow/mainwindow.py b/qutebrowser/mainwindow/mainwindow.py
--- a/qutebrowser/mainwindow/mainwindow.py
+++ b/qutebrowser/mainwindow/mainwindow.py
@@ -145,6 +145,18 @@ class MainWindow(QWidget):
         _private: Whether the window is in private browsing mode.
     """
 
+    # Application wide stylesheets
+    STYLESHEET = """
+        HintLabel {
+            background-color: {{ conf.colors.hints.bg }};
+            color: {{ conf.colors.hints.fg }};
+            font: {{ conf.fonts.hints }};
+            border: {{ conf.hints.border }};
+            padding-left: 3px;
+            padding-right: 3px;
+        }
+    """
+
     def __init__(self, *, private, geometry=None, parent=None):
         """Create a new main window.
 
@@ -240,6 +252,7 @@ def __init__(self, *, private, geometry=None, parent=None):
         self._set_decoration(config.val.window.hide_decoration)
 
         self.state_before_fullscreen = self.windowState()
+        config.set_register_stylesheet(self)
 
     def _init_geometry(self, geometry):
         """Initialize the window geometry or load it from disk."""


Test patch: