From 91701db744e2d20181fceb36b4088ea6ea4b468d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20K=C5=82os?= Date: Sun, 31 Mar 2024 10:36:35 +0200 Subject: [PATCH] jsdialog: css: put toolbuttons rules in btns.css MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - put in single place with other button rules - apply also to .jsdialog case (selected, hover) so it will be used in new toolbars Signed-off-by: Szymon Kłos Change-Id: Ic04e1939908e0030e710902d38846ba50954fe23 --- browser/css/btns.css | 46 +++++++++++++++++++++++++++++++++++++ browser/css/jssidebar.css | 46 ------------------------------------- browser/css/notebookbar.css | 4 ---- 3 files changed, 46 insertions(+), 50 deletions(-) diff --git a/browser/css/btns.css b/browser/css/btns.css index 23f286faf..773f232a6 100644 --- a/browser/css/btns.css +++ b/browser/css/btns.css @@ -15,6 +15,52 @@ width: var(--btn-size); height: var(--btn-size); } +.unotoolbutton .unobutton.selected + .ui-content.unolabel { + color: var(--color-text-dark); +} +/* toolbuttons non selected */ +#clearFormatting, +.hasnotebookbar .ui-content.unotoolbutton.has-label, +.hasnotebookbar .ui-content.unotoolbutton.inline, +.hasnotebookbar .ui-content.unotoolbutton:not(.has-label):not(.inline), +.sidebar.unotoolbutton, +.jsdialog.unotoolbutton { + background-color: transparent; + border: 1px solid transparent; + color: var(--color-main-text); + border-radius: var(--border-radius); +} +/* toolbuttons selected */ +.hasnotebookbar .ui-content.unotoolbutton.selected.has-label, +.hasnotebookbar .ui-content.unotoolbutton.selected.inline, +.hasnotebookbar .ui-content.unotoolbutton.selected:not(.has-label):not(.inline), +.sidebar.unotoolbutton.selected, +.jsdialog.unotoolbutton.selected { + background-color: var(--color-background-dark); + border: 1px solid var(--color-border-dark); + color: var(--color-text-dark); + border-radius: var(--border-radius); +} +[data-theme='dark'] .hasnotebookbar .ui-content.unotoolbutton.selected.has-label, +[data-theme='dark'] #toggledarktheme, +[data-theme='dark'] .hasnotebookbar .ui-content.unotoolbutton.selected.inline, +[data-theme='dark'] .hasnotebookbar .ui-content.unotoolbutton.selected:not(.has-label):not(.inline), +[data-theme='dark'] .sidebar.unotoolbutton.selected { + background-color: var(--color-background-darker); + border-color: var(--color-border-darker); +} +/* toolbuttons selected hover */ +.hasnotebookbar .ui-content.unotoolbutton.selected:hover, +.unotoolbutton.notebookbar:hover, +.unotoolbutton.jsdialog:hover, +.hasnotebookbar .ui-content.unotoolbutton.selected:not(.has-label):not(.inline):hover, +.sidebar.unotoolbutton.selected:hover, +.jsdialog.unotoolbutton.selected:hover { + background-color: var(--color-background-darker) !important; + border: 1px solid var(--color-border-darker); + color: var(--color-text-darker); + border-radius: var(--border-radius); +} /*limit icon to button height*/ button.jsdialog img { diff --git a/browser/css/jssidebar.css b/browser/css/jssidebar.css index fccab7318..23f6962f6 100644 --- a/browser/css/jssidebar.css +++ b/browser/css/jssidebar.css @@ -170,52 +170,6 @@ div.sidebar.ui-grid .checkbutton.sidebar, width: 198px; } -/* widget selected */ - -/* non selected */ -#clearFormatting, -.hasnotebookbar .ui-content.unotoolbutton.has-label, -.hasnotebookbar .ui-content.unotoolbutton.inline, -.hasnotebookbar .ui-content.unotoolbutton:not(.has-label):not(.inline), -.sidebar.unotoolbutton, -.jsdialog.unotoolbutton { - background-color: transparent; - border: 1px solid transparent; - color: var(--color-main-text); - border-radius: var(--border-radius); -} -/* selected */ -.hasnotebookbar .ui-content.unotoolbutton.selected.has-label, -.hasnotebookbar .ui-content.unotoolbutton.selected.inline, -.hasnotebookbar .ui-content.unotoolbutton.selected:not(.has-label):not(.inline), -.sidebar.unotoolbutton.selected { - background-color: var(--color-background-dark); - border: 1px solid var(--color-border-dark); - color: var(--color-text-dark); - border-radius: var(--border-radius); -} -[data-theme='dark'] .hasnotebookbar .ui-content.unotoolbutton.selected.has-label, -[data-theme='dark'] #toggledarktheme, -[data-theme='dark'] .hasnotebookbar .ui-content.unotoolbutton.selected.inline, -[data-theme='dark'] .hasnotebookbar .ui-content.unotoolbutton.selected:not(.has-label):not(.inline), -[data-theme='dark'] .sidebar.unotoolbutton.selected { - background-color: var(--color-background-darker); - border-color: var(--color-border-darker); -} -/* selected hover */ -.hasnotebookbar .ui-content.unotoolbutton.selected:hover, -.unotoolbutton.notebookbar:hover, -.unotoolbutton.jsdialog:hover, -.hasnotebookbar .ui-content.unotoolbutton.selected:not(.has-label):not(.inline):hover, -.sidebar.unotoolbutton:hover, -.sidebar.unotoolbutton.selected:hover { - background-color: var(--color-background-darker) !important; - border: 1px solid var(--color-border-darker); - color: var(--color-text-darker); - border-radius: var(--border-radius); -} - - /* fixes */ .sidebar.ui-grid-cell .sidebar.ui-pushbutton { diff --git a/browser/css/notebookbar.css b/browser/css/notebookbar.css index 0d8b63815..d3e6a4077 100644 --- a/browser/css/notebookbar.css +++ b/browser/css/notebookbar.css @@ -268,10 +268,6 @@ button.ui-tab.notebookbar { padding: 4px; } -.unotoolbutton.notebookbar .unobutton.selected + .ui-content.unolabel { - color: var(--color-text-dark); -} - .unotoolbutton.notebookbar.disabled:not(.unospan-shortcutstoolbox), .unotoolbutton[disabled]:not(.unospan-shortcutstoolbox), .mobile-wizard-widebutton.disabled,