Skip to content

Commit b481d49

Browse files
committed
Notebookbar: Fix alignment inconsistencies for labeled unotoolbuttons
-Unotoolbuttons with labels had varying heights across browsers, leading to misaligned toolbar elements. This change enforces a consistent height using `--notebookbar-element-height` and centers their content, ensuring uniform alignment in both Chrome and Safari. Signed-off-by: Banobe Pascal <[email protected]> Change-Id: Ibf2e25eefcc23f12bf52d5eb396837f6affbb15b
1 parent 8d3b608 commit b481d49

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

browser/css/jsdialogs.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,11 @@ algned to the bottom */
438438
margin-bottom: 14px !important;
439439
}
440440

441+
.unotoolbutton.notebookbar.ui-content.has-label > *:not(.arrowbackground) {
442+
height: var(--notebookbar-element-height) !important;
443+
align-content: center;
444+
}
445+
441446
.ui-overflow-manager .notebookbar.ui-overflow-group-container-with-label {
442447
justify-content: center;
443448
}
@@ -1408,10 +1413,6 @@ input[type='number']:hover::-webkit-outer-spin-button {
14081413
box-sizing: border-box;
14091414
}
14101415

1411-
.notebookbar .ui-overflow-group-inner {
1412-
height: var(--notebookbar-element-height);
1413-
align-content: center;
1414-
}
14151416

14161417
.ui-overflow-group-label {
14171418
font-family: var(--jquery-ui-font);

browser/css/notebookbar.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ html[data-theme='dark'] .savemodified.unotoolbutton .unobutton img {
218218
.root-container.notebookbar {
219219
display: table-cell;
220220
vertical-align: middle;
221+
align-content: center;
221222
}
222223

223224
#toolbar-wrapper.hasnotebookbar {
@@ -259,8 +260,10 @@ html[data-theme='dark'] .savemodified.unotoolbutton .unobutton img {
259260
color: var(--color-main-text);
260261
}
261262

262-
.horizontal.notebookbar:has(.unoBezier_Unfilled) {
263-
height: 100%;
263+
/* Curve isn't in a vertical notebookbar, so it's center-aligned by default instead of top-aligned.
264+
This rule ensures it aligns to the top. */
265+
.horizontal.notebookbar #insert-illustrations.ui-overflow-group .ui-overflow-group-content,
266+
.horizontal.notebookbar #insert-illustrations.ui-overflow-group .top-row-overflow-group {
264267
align-items: start;
265268
}
266269

0 commit comments

Comments
 (0)