comparison view/PaneStack.cpp @ 497:5e6991aefdc5

* os/x layout fixes (make the X button flat, otherwise the margins go all weird)
author Chris Cannam
date Mon, 23 Feb 2009 19:24:07 +0000
parents 92b89764eb3b
children 666cdcae5f0d
comparison
equal deleted inserted replaced
496:d01f2e406cc5 497:5e6991aefdc5
65 65
66 QGridLayout *layout = new QGridLayout; 66 QGridLayout *layout = new QGridLayout;
67 layout->setMargin(0); 67 layout->setMargin(0);
68 layout->setSpacing(2); 68 layout->setSpacing(2);
69 69
70
70 // QHBoxLayout *layout = new QHBoxLayout; 71 // QHBoxLayout *layout = new QHBoxLayout;
71 72
72 // QVBoxLayout *vlayout = new QVBoxLayout; 73 // QVBoxLayout *vlayout = new QVBoxLayout;
73 // layout->addLayout(vlayout); 74 // layout->addLayout(vlayout);
74 // layout->setStretchFactor(vlayout, 0); 75 // layout->setStretchFactor(vlayout, 0);
75 76
76 QPushButton *xButton = new QPushButton(frame); 77 QPushButton *xButton = new QPushButton(frame);
77 xButton->setIcon(IconLoader().load("cross")); 78 xButton->setIcon(IconLoader().load("cross"));
78 xButton->setFixedSize(QSize(16, 16)); 79 xButton->setFixedSize(QSize(16, 16));
80 xButton->setFlat(true);
79 layout->addWidget(xButton, 0, 0); 81 layout->addWidget(xButton, 0, 0);
80 // vlayout->setStretchFactor(xButton, 0); 82 // vlayout->setStretchFactor(xButton, 0);
81 connect(xButton, SIGNAL(clicked()), this, SLOT(paneDeleteButtonClicked())); 83 connect(xButton, SIGNAL(clicked()), this, SLOT(paneDeleteButtonClicked()));
82 84
83 QLabel *currentIndicator = new QLabel(frame); 85 QLabel *currentIndicator = new QLabel(frame);
84 // currentIndicator->setFixedWidth(QPainter(this).fontMetrics().width("x")); 86 // currentIndicator->setFixedWidth(QPainter(this).fontMetrics().width("x"));
85 layout->addWidget(currentIndicator, 1, 0); 87 layout->addWidget(currentIndicator, 1, 0);
86 layout->setRowStretch(1, 20); 88 layout->setRowStretch(1, 20);
89 currentIndicator->setMinimumWidth(8);
87 currentIndicator->setScaledContents(true); 90 currentIndicator->setScaledContents(true);
88 91
89 Pane *pane = new Pane(frame); 92 Pane *pane = new Pane(frame);
90 pane->setViewManager(m_viewManager); 93 pane->setViewManager(m_viewManager);
91 layout->addWidget(pane, 0, 1, 2, 1); 94 layout->addWidget(pane, 0, 1, 2, 1);