125 btnRandomize->setFixedHeight(30); |
125 btnRandomize->setFixedHeight(30); |
126 btnRandomize->setIconSize(sz); |
126 btnRandomize->setIconSize(sz); |
127 btnRandomize->setFlat(true); |
127 btnRandomize->setFlat(true); |
128 btnRandomize->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
128 btnRandomize->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
129 connect(btnRandomize, SIGNAL(clicked()), this, SLOT(setRandomMap())); |
129 connect(btnRandomize, SIGNAL(clicked()), this, SLOT(setRandomMap())); |
|
130 |
130 m_childWidgets << btnRandomize; |
131 m_childWidgets << btnRandomize; |
131 btnRandomize->setStyleSheet("padding: 5px;"); |
132 btnRandomize->setStyleSheet("padding: 5px;"); |
132 btnRandomize->setFixedHeight(cType->height()); |
133 btnRandomize->setFixedHeight(cType->height()); |
133 topLayout->addWidget(btnRandomize, 1); |
134 topLayout->addWidget(btnRandomize, 1); |
134 |
135 |
249 /* Add stretch above theme button */ |
250 /* Add stretch above theme button */ |
250 |
251 |
251 bottomLeftLayout->addStretch(1); |
252 bottomLeftLayout->addStretch(1); |
252 |
253 |
253 /* Theme chooser */ |
254 /* Theme chooser */ |
|
255 QHBoxLayout * themeHBox = new QHBoxLayout(this); |
|
256 |
|
257 btnRandTheme = new QPushButton(); |
|
258 btnRandTheme->setIcon(lp); |
|
259 btnRandTheme->setIconSize(QSize(24, 24)); |
|
260 btnRandTheme->setFixedHeight(30); |
|
261 btnRandTheme->setFixedWidth(30); |
|
262 connect(btnRandTheme, SIGNAL(clicked()), this, SLOT(setRandomTheme())); |
|
263 m_childWidgets << btnTheme; |
|
264 themeHBox->addWidget(btnRandTheme, 0); |
254 |
265 |
255 btnTheme = new QPushButton(this); |
266 btnTheme = new QPushButton(this); |
256 btnTheme->setFlat(true); |
267 btnTheme->setFlat(true); |
257 btnTheme->setIconSize(QSize(30, 30)); |
268 btnTheme->setIconSize(QSize(30, 30)); |
258 btnTheme->setFixedHeight(30); |
269 btnTheme->setFixedHeight(30); |
|
270 btnTheme->setMaximumWidth(222); |
259 connect(btnTheme, SIGNAL(clicked()), this, SLOT(showThemePrompt())); |
271 connect(btnTheme, SIGNAL(clicked()), this, SLOT(showThemePrompt())); |
260 m_childWidgets << btnTheme; |
272 m_childWidgets << btnTheme; |
261 bottomLeftLayout->addWidget(btnTheme, 0); |
273 themeHBox->addWidget(btnTheme, 1); |
|
274 |
|
275 bottomLeftLayout->addLayout(themeHBox); |
262 |
276 |
263 /* Add everything to main layout */ |
277 /* Add everything to main layout */ |
264 |
278 |
265 mainLayout.addWidget(topWidget, 0); |
279 mainLayout.addWidget(topWidget, 0); |
266 mainLayout.addLayout(twoColumnLayout, 1); |
280 mainLayout.addLayout(twoColumnLayout, 1); |
893 { |
907 { |
894 if (m_mapInfo.type != MapModel::StaticMap && m_mapInfo.type != MapModel::HandDrawnMap) |
908 if (m_mapInfo.type != MapModel::StaticMap && m_mapInfo.type != MapModel::HandDrawnMap) |
895 { |
909 { |
896 btnTheme->setIconSize(QSize(30, 30)); |
910 btnTheme->setIconSize(QSize(30, 30)); |
897 btnTheme->setFixedHeight(30); |
911 btnTheme->setFixedHeight(30); |
|
912 btnRandTheme->setFixedHeight(30); |
|
913 btnRandTheme->setIconSize(QSize(24, 24)); |
898 } |
914 } |
899 else |
915 else |
900 { |
916 { |
901 QSize iconSize = btnTheme->icon().actualSize(QSize(65535, 65535)); |
917 QSize iconSize = btnTheme->icon().actualSize(QSize(65535, 65535)); |
|
918 btnRandTheme->setFixedHeight(64); |
902 btnTheme->setFixedHeight(64); |
919 btnTheme->setFixedHeight(64); |
903 btnTheme->setIconSize(iconSize); |
920 btnTheme->setIconSize(iconSize); |
|
921 btnRandTheme->setIconSize(QSize(32, 32)); |
904 } |
922 } |
905 |
923 |
906 repaint(); |
924 repaint(); |
907 } |
925 } |
908 |
926 |