Merge branch 'uppercase-hint'
This commit is contained in:
commit
6f81a5094a
@ -233,6 +233,7 @@ Contributors, sorted by the number of commits in descending order:
|
|||||||
// QUTE_AUTHORS_START
|
// QUTE_AUTHORS_START
|
||||||
* Florian Bruhin
|
* Florian Bruhin
|
||||||
* Claude
|
* Claude
|
||||||
|
* Peter Vilim
|
||||||
// QUTE_AUTHORS_END
|
// QUTE_AUTHORS_END
|
||||||
|
|
||||||
Thanks / Similiar projects
|
Thanks / Similiar projects
|
||||||
|
@ -110,6 +110,7 @@ class HintManager(QObject):
|
|||||||
display: {display};
|
display: {display};
|
||||||
color: {config[colors][hints.fg]};
|
color: {config[colors][hints.fg]};
|
||||||
background: {config[colors][hints.bg]};
|
background: {config[colors][hints.bg]};
|
||||||
|
text-transform: {texttransform};
|
||||||
font: {config[fonts][hints]};
|
font: {config[fonts][hints]};
|
||||||
border: {config[hints][border]};
|
border: {config[hints][border]};
|
||||||
opacity: {config[hints][opacity]};
|
opacity: {config[hints][opacity]};
|
||||||
@ -271,6 +272,13 @@ class HintManager(QObject):
|
|||||||
display = 'inline'
|
display = 'inline'
|
||||||
else:
|
else:
|
||||||
display = 'none'
|
display = 'none'
|
||||||
|
|
||||||
|
# Make text uppercase if set in config
|
||||||
|
if (config.get('hints', 'uppercase') and
|
||||||
|
config.get('hints', 'mode') == 'letter'):
|
||||||
|
texttransform = 'uppercase'
|
||||||
|
else:
|
||||||
|
texttransform = 'none'
|
||||||
rect = elem.geometry()
|
rect = elem.geometry()
|
||||||
left = rect.x()
|
left = rect.x()
|
||||||
top = rect.y()
|
top = rect.y()
|
||||||
@ -279,7 +287,8 @@ class HintManager(QObject):
|
|||||||
left /= zoom
|
left /= zoom
|
||||||
top /= zoom
|
top /= zoom
|
||||||
return self.HINT_CSS.format(
|
return self.HINT_CSS.format(
|
||||||
left=left, top=top, config=objreg.get('config'), display=display)
|
left=left, top=top, config=objreg.get('config'), display=display,
|
||||||
|
texttransform=texttransform)
|
||||||
|
|
||||||
def _draw_label(self, elem, string):
|
def _draw_label(self, elem, string):
|
||||||
"""Draw a hint label over an element.
|
"""Draw a hint label over an element.
|
||||||
|
@ -512,6 +512,10 @@ DATA = collections.OrderedDict([
|
|||||||
SettingValue(typ.String(minlen=2), 'asdfghjkl'),
|
SettingValue(typ.String(minlen=2), 'asdfghjkl'),
|
||||||
"Chars used for hint strings."),
|
"Chars used for hint strings."),
|
||||||
|
|
||||||
|
('uppercase',
|
||||||
|
SettingValue(typ.Bool(), 'false'),
|
||||||
|
"Make chars in hint strings uppercase."),
|
||||||
|
|
||||||
('auto-follow',
|
('auto-follow',
|
||||||
SettingValue(typ.Bool(), 'true'),
|
SettingValue(typ.Bool(), 'true'),
|
||||||
"Whether to auto-follow a hint if there's only one left."),
|
"Whether to auto-follow a hint if there's only one left."),
|
||||||
|
Loading…
Reference in New Issue
Block a user