Changeset View
Changeset View
Standalone View
Standalone View
app/savebar.cpp
Show First 20 Lines • Show All 202 Lines • ▼ Show 20 Line(s) | 194 | } else { | |||
---|---|---|---|---|---|
203 | } | 203 | } | ||
204 | } | 204 | } | ||
205 | 205 | | |||
206 | mSaveCurrentUrlButton->setVisible(lst.contains(mCurrentUrl)); | 206 | mSaveCurrentUrlButton->setVisible(lst.contains(mCurrentUrl)); | ||
207 | mSaveAsButton->setVisible(lst.contains(mCurrentUrl)); | 207 | mSaveAsButton->setVisible(lst.contains(mCurrentUrl)); | ||
208 | mSaveAllButton->setVisible(lst.size() >= 1); | 208 | mSaveAllButton->setVisible(lst.size() >= 1); | ||
209 | 209 | | |||
210 | mMessageLabel->setText(message); | 210 | mMessageLabel->setText(message); | ||
211 | mMessageLabel->setMaximumWidth(mMessageLabel->minimumSizeHint().width()); | ||||
211 | mActionsLabel->setText(links.join(" | ")); | 212 | mActionsLabel->setText(links.join(" | ")); | ||
212 | } | 213 | } | ||
213 | 214 | | |||
214 | void updateWidgetSizes() | 215 | void updateWidgetSizes() | ||
215 | { | 216 | { | ||
216 | QVBoxLayout* layout = static_cast<QVBoxLayout*>(mSaveBarWidget->layout()); | 217 | QVBoxLayout* layout = static_cast<QVBoxLayout*>(mSaveBarWidget->layout()); | ||
217 | int topRowHeight = q->window()->isFullScreen() ? 0 : mTopRowWidget->height(); | 218 | int topRowHeight = q->window()->isFullScreen() ? 0 : mTopRowWidget->height(); | ||
218 | int bottomRowHeight = mTooManyChangesFrame->isVisibleTo(mSaveBarWidget) ? mTooManyChangesFrame->sizeHint().height() : 0; | 219 | int bottomRowHeight = mTooManyChangesFrame->isVisibleTo(mSaveBarWidget) ? mTooManyChangesFrame->sizeHint().height() : 0; | ||
Show All 12 Lines | |||||
231 | { | 232 | { | ||
232 | d->q = this; | 233 | d->q = this; | ||
233 | d->mActionCollection = actionCollection; | 234 | d->mActionCollection = actionCollection; | ||
234 | d->mSaveBarWidget = new QWidget(); | 235 | d->mSaveBarWidget = new QWidget(); | ||
235 | d->mSaveBarWidget->setObjectName(QLatin1String("saveBarWidget")); | 236 | d->mSaveBarWidget->setObjectName(QLatin1String("saveBarWidget")); | ||
236 | d->applyNormalStyleSheet(); | 237 | d->applyNormalStyleSheet(); | ||
237 | 238 | | |||
238 | d->mMessageLabel = new QLabel; | 239 | d->mMessageLabel = new QLabel; | ||
239 | d->mMessageLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); | 240 | d->mMessageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); | ||
240 | 241 | | |||
241 | d->mUndoButton = createToolButton(); | 242 | d->mUndoButton = createToolButton(); | ||
242 | d->mRedoButton = createToolButton(); | 243 | d->mRedoButton = createToolButton(); | ||
243 | d->mSaveCurrentUrlButton = createToolButton(); | 244 | d->mSaveCurrentUrlButton = createToolButton(); | ||
244 | d->mSaveAsButton = createToolButton(); | 245 | d->mSaveAsButton = createToolButton(); | ||
245 | d->mSaveAllButton = createToolButton(); | 246 | d->mSaveAllButton = createToolButton(); | ||
246 | 247 | | |||
247 | d->mActionsLabel = new QLabel; | 248 | d->mActionsLabel = new QLabel; | ||
248 | d->mActionsLabel->setAlignment(Qt::AlignCenter); | 249 | d->mActionsLabel->setAlignment(Qt::AlignCenter); | ||
249 | d->mActionsLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); | 250 | d->mActionsLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); | ||
250 | 251 | | |||
251 | d->createTooManyChangesFrame(); | 252 | d->createTooManyChangesFrame(); | ||
252 | 253 | | |||
253 | // Setup top row | 254 | // Setup top row | ||
254 | d->mTopRowWidget = new QWidget; | 255 | d->mTopRowWidget = new QWidget; | ||
255 | QHBoxLayout* rowLayout = new QHBoxLayout(d->mTopRowWidget); | 256 | QHBoxLayout* rowLayout = new QHBoxLayout(d->mTopRowWidget); | ||
256 | rowLayout->addWidget(d->mMessageLabel); | 257 | rowLayout->addWidget(d->mMessageLabel); | ||
257 | rowLayout->addWidget(d->mUndoButton); | 258 | rowLayout->addWidget(d->mUndoButton); | ||
▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines |