MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / sizeTrailingButton

Function sizeTrailingButton

pj_app/src/ui/Scene3DConfigPanel.cpp:72–78  ·  view source on GitHub ↗

Uniform sizing for the inline eye/add/trash buttons so the trailing column is pixel-aligned regardless of the platform style's default tool-button metrics.

Source from the content-addressed store, hash-verified

70// Uniform sizing for the inline eye/add/trash buttons so the trailing column is
71// pixel-aligned regardless of the platform style's default tool-button metrics.
72void sizeTrailingButton(QToolButton* button) {
73 button->setIconSize(QSize(kTrailingIconPx, kTrailingIconPx));
74 // Fixed HEIGHT too (== the input height), else the tool button's natural
75 // height (~24-26px) inflates its grid row above the 20px inputs and loosens
76 // the row spacing.
77 button->setFixedSize(kTrailingSlotWidth, PJ::Style::kInputHeight);
78}
79
80// Add one [label | field | trailing] row to a 3-column scene-control grid.
81// Using a real grid column (not an in-cell spacer) keeps every field's right

Callers 2

buildSceneControlsMethod · 0.85
addRobotRowMethod · 0.85

Calls 2

setIconSizeMethod · 0.80
QSizeClass · 0.50

Tested by

no test coverage detected