Palette: 75% width, centered (was full-width edge-to-edge)
This commit is contained in:
parent
d9df62e7ed
commit
5597dae15d
|
|
@ -414,11 +414,12 @@ void OllieView::positionPalette(PaletteWidget *palette)
|
||||||
if (!w) {
|
if (!w) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Span the window width (minus a small margin), anchored near the top, so
|
// Three quarters of the window width, horizontally centered, anchored near
|
||||||
// long paths / symbol labels fit without truncation.
|
// the top — roomy enough for long paths / symbol labels without looking
|
||||||
const int margin = 12;
|
// edge-to-edge.
|
||||||
palette->resize(w->width() - 2 * margin, 320);
|
const int width = (w->width() * 3) / 4;
|
||||||
palette->move(w->mapToGlobal(QPoint(margin, w->height() / 6)));
|
palette->resize(width, 320);
|
||||||
|
palette->move(w->mapToGlobal(QPoint((w->width() - width) / 2, w->height() / 6)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OllieView::showCommandPalette()
|
void OllieView::showCommandPalette()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue