fix size radiobutton widget

master3.3
Denis Spiridonov 12 years ago
parent 1ba87c6606
commit 04290269f0

@ -236,25 +236,26 @@ class ToolTabWidget(QtGui.QTabWidget):
self.setWindowTitle(self.Name)
self.setStyleSheet(
'''
QTabBar::tab:last {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
border: 2px solid #C4C4C3;
border-bottom-color: #C2C7CB; /* same as the pane color */
border-top-left-radius: 4px;
border-top-right-radius: 4px;
padding-left: 3px;
margin-left: 3px;
margin-bottom: 5px;
margin-top: 2px;
width: 18px;
}''')
#margin-left: 4px;
#padding: 4px;
#border: 2px;
'''
QTabBar::tab:last {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
border: 2px solid #C4C4C3;
border-bottom-color: #C2C7CB; /* same as the pane color */
border-top-left-radius: 4px;
border-top-right-radius: 4px;
padding-left: 3px;
margin-left: 3px;
margin-bottom: 5px;
margin-top: 2px;
width: 18px;
}''')
#margin-left: 4px;
#padding: 4px;
#border: 2px;
self.setWindowIcon (QtGui.QIcon \
('/usr/share/pixmaps/cl-install-gui.png'))

@ -56,7 +56,7 @@ class LeftMenu(QtGui.QScrollArea):
'QLabel'
'{'
'background-color: rgba(255, 255, 255, 180);'
'border: 2px outset gray;'
'border-bottom: 2px outset gray;'
'border-radius: 6px;'
'}')
@ -222,8 +222,8 @@ class LeftMenu(QtGui.QScrollArea):
'QLabel'
'{'
'background-color: rgba(255, 255, 255, 180);'
'border: 2px outset gray;'
'border-radius: 6px;'
'border-bottom: 2px outset gray;'
'border-radius: 2px;'
'}')
self.layout.addWidget(self.method_name_lbl)

@ -127,6 +127,7 @@ class MainFrame(QtGui.QWidget):
x += 1
if field.element == 'error':
print 'DDDDDDDDDDDDDDDDD'
self.label_dict[field.name] = \
LabelWordWrap(field.label, self)
self.label_dict[field.name].setStyleSheet('color:red;')
@ -419,11 +420,14 @@ class MainFrame(QtGui.QWidget):
if choice[i] == None:
choice[i] = ''
try:
if comments[i]:
radio_but.setText(comments[i])
if comments:
if comments[i]:
radio_but.setText(comments[i])
else:
radio_but.setText(choice[i])
else:
radio_but.setText(choice[i])
except IndexError:
except (IndexError, TypeError):
radio_but.setText(choice[i])
radio_but.set_data(choice[i])
@ -443,6 +447,8 @@ class MainFrame(QtGui.QWidget):
if field.uncompatible:
self.view_dict[field.name].setToolTip(field.uncompatible)
self.view_dict[field.name].setDisabled(True)
self.view_dict[field.name].setFixedHeight\
(self.view_dict[field.name].sizeHint().height())
self.grid.addWidget(self.view_dict[field.name], x, y+1)
def add_element_combo (self, field, x, y):
@ -1320,7 +1326,8 @@ class MainFrame(QtGui.QWidget):
if self.error_label_dict.has_key(str(error.field)):
self.error_label_dict[error.field].setStyleSheet \
("QLabel { color : red; }")
self.error_label_dict[error.field].setText(error.message)
error_msg = error.message.strip('\n')
self.error_label_dict[error.field].setText(error_msg)
self.error_label_dict[error.field].show()
if self.label_dict.has_key(str(error.field)):
self.label_dict[error.field].setStyleSheet \

Loading…
Cancel
Save