Added style and pngs for the buttons

This commit is contained in:
Atlante45 2014-02-19 16:01:14 -08:00
parent 406768bf12
commit af3e19e640
2 changed files with 29 additions and 9 deletions

View file

@ -62,6 +62,21 @@ QPushButton#cancelButton {
margin-right: 11px;
}
#backButton {
background-image: url(resources/icons/backButton.svg);
border-radius: 0px;
}
#forwardButton {
background-image: url(resources/icons/forwardButton.svg);
border-radius: 0px;
}
#toParentButton {
background-image: url(resources/icons/toParentButton.svg);
border-radius: 0px;
}
QSidebar, QTreeView {
border: 1px solid #C5C5C5;
font-size: 14px;

View file

@ -181,9 +181,21 @@ void ImportDialog::setLayout() {
// set fixed size
_importButton.setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
_cancelButton.setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
_progressBar.setFixedHeight(7);
_cancelButton.setFlat(true);
int progressBarHeight = 7;
_progressBar.setFixedHeight(progressBarHeight);
_progressBar.setTextVisible(false);
QSize BUTTON_SIZE = QSize(43, 33);
QPushButton* button = (QPushButton*) findChild<QWidget*>("backButton");
button->setIcon(QIcon());
button->setFixedSize(BUTTON_SIZE);
button = (QPushButton*) findChild<QWidget*>("forwardButton");
button->setIcon(QIcon());
button->setFixedSize(BUTTON_SIZE);
button = (QPushButton*) findChild<QWidget*>("toParentButton");
button->setIcon(QIcon());
button->setFixedSize(BUTTON_SIZE);
// hide unused embedded widgets in QFileDialog
QWidget* widget = findChild<QWidget*>("lookInCombo");
@ -224,13 +236,6 @@ void ImportDialog::setLayout() {
widget->setAttribute(Qt::WA_MacShowFocusRect, false);
switchToResourcesParentIfRequired();
QIcon icon = QIcon("resources/icons/backButton.svg");
QPushButton* button = (QPushButton*) findChild<QWidget*>("backButton");
//button->setIcon(icon);
button = (QPushButton*) findChild<QWidget*>("forwardButton");
button = (QPushButton*) findChild<QWidget*>("toParentButton");
QFile styleSheet("resources/styles/import_dialog.qss");
if (styleSheet.open(QIODevice::ReadOnly)) {
setStyleSheet(styleSheet.readAll());