From 282ed4ea88f9ce0f1ab7e07a07e2814f966d8f74 Mon Sep 17 00:00:00 2001 From: Jukka Jokiniva Date: Fri, 4 Jan 2019 13:05:32 +0200 Subject: Add Qt logos to the UI header Fixes: QTBI-1555 Change-Id: I415474bec72275bd98139005fb9fdaa82cafb242 Reviewed-by: Kari Oikarinen --- qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html | 31 +++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html b/qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html index 2d42702..1739d2a 100644 --- a/qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html +++ b/qt-gerrit-ui-plugin/qt-gerrit-ui-plugin.html @@ -1,5 +1,5 @@ // -// Copyright (C) 2018 The Qt Company +// Copyright (C) 2019 The Qt Company // // This plugin provides UI customization for codereview.qt-project.org // @@ -28,6 +28,35 @@ return template.content.firstChild; } + // Customize header + plugin.hook('header-title', {replace: true} ).onAttached(element => { + const css_str = ''; + const html_str = '
\ +
    \ +
  • \ +
  • \ +
\ +
'; + var elem = htmlToElement(css_str); + element.appendChild(elem); + elem = htmlToElement(html_str); + element.appendChild(elem); + }); + // Customize header changes dropdown menu plugin.hook('header-dropdown-Changes').onAttached(element => { // this is ugly, but there is no API for this -- cgit v1.2.3