aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@qt.io>2019-05-24 09:55:09 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2019-05-24 10:45:30 +0000
commitb63c0de3f76d86de6f734cf546d949072bf80993 (patch)
treef85a6c3f46503cc034541d1480dde9ebc6987a27
parent6b6abb74af3d76491b3658c672dde2593d3e23e3 (diff)
Improve the Qt customized title bar
Smaller logo and use text for the 'home' link. Fixe the "_" appearing when hovering the link. Also aligns us a bit more with upstream. Fixes: QTQAINFRA-2973 Change-Id: Ifaffc5082e52fda8375f131fd9b227e9148a4840 Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html30
1 files changed, 12 insertions, 18 deletions
diff --git a/qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html b/qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html
index 1d6c206..a43e068 100644
--- a/qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html
+++ b/qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html
@@ -47,25 +47,19 @@
// Customize header
plugin.hook('header-title', {replace: true} ).onAttached(element => {
const css_str = '<style> \
- #qt-header ul { \
- width: 100%; \
- margin: 0; \
- text-align: left; \
- padding: 0.5em 0 .1em 0; \
- } \
- #qt-header li { \
- display: inline; \
- padding: 0.3em; \
- } \
- #qt-header img { \
- vertical-align: top; \
- } \
- </style>';
+ .titleText::before {\
+ background-image: url("/static/logo_qt.png");\
+ background-size: 40px 30px;\
+ background-repeat: no-repeat;\
+ content: "";\
+ display: inline-block;\
+ height: 36px;\
+ vertical-align: text-top;\
+ width: 46px;\
+ }\
+ </style>';
const html_str = '<div id="qt-header"> \
- <ul> \
- <li><img src="/static/logo_qt.png"/></li> \
- <li><img src="/static/logo_open_gov.png"/></li> \
- </ul> \
+ <div class="titleText">Code Review</div> \
</div>';
var elem = htmlToElement(css_str);
element.appendChild(elem);