Changeset View
Changeset View
Standalone View
Standalone View
app/sidebar.cpp
Context not available. | |||||
124 | } | 124 | } | ||
---|---|---|---|---|---|
125 | } | 125 | } | ||
126 | 126 | | |||
127 | void SideBarGroup::updateTitleMargin(QMargins margin) | ||||
128 | { | ||||
129 | d->mTitleLabel->setContentsMargins(margin); | ||||
130 | } | ||||
131 | | ||||
127 | void SideBarGroup::addWidget(QWidget* widget) | 132 | void SideBarGroup::addWidget(QWidget* widget) | ||
128 | { | 133 | { | ||
129 | widget->setParent(d->mContainer); | 134 | widget->setParent(d->mContainer); | ||
Context not available. | |||||
153 | button->setAutoRaise(true); | 158 | button->setAutoRaise(true); | ||
rkflx: This caught my eye, because setting a non-quadratic icon size seems like a hack. And indeed… | |||||
Nice catch, @rkflx. It would indeed be great if we can move the icons over a bit to match the typical icon placement within a toolbutton. ngraham: Nice catch, @rkflx. It would indeed be great if we can move the icons over a bit to match the… | |||||
rkflx: Spacing now looks almost like it was designed by a professional designer, good job!
However… | |||||
See also D7581 and the API docs of drawPixmap. Maybe using the function call with ...F (floating point) parameters will help here? rkflx: See also D7581 and the API docs of `drawPixmap`. Maybe using the function call with `...F`… | |||||
154 | button->setDefaultAction(action); | 159 | button->setDefaultAction(action); | ||
155 | button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); | 160 | button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); | ||
156 | button->setIconSize(QSize(size, size)); | 161 | // size units extra width to create some padding between icon and button boundary | ||
162 | button->setIconSize(QSize(2*size, size)); | ||||
Can you remove this? I think I found a way to fix the problem properly. Still needs some fiddling, but I'll have it figured out soon™ (sorry for the cliffhanger :) rkflx: Can you remove this? I think I found a way to fix the problem properly. Still needs some… | |||||
rkflx: Phab shows a whitespace change here (added empty line), please remove. | |||||
157 | if (action->menu()) { | 163 | if (action->menu()) { | ||
158 | button->setPopupMode(QToolButton::InstantPopup); | 164 | button->setPopupMode(QToolButton::InstantPopup); | ||
159 | } | 165 | } | ||
Context not available. |
This caught my eye, because setting a non-quadratic icon size seems like a hack. And indeed, this leads to much more spacing now between icon and text. Could you try to find a way so the spacing looks basically the same as in the toolbar button at the top of the following screenshot?:
If this turns out to be too difficult, I'm willing to accept the current state. But at least we should try to be consistent here before giving up…