Fix background on scrollarea

master3.3
Denis Spiridonov 13 years ago
parent 3ee737d682
commit 3c94f9deb5

@ -52,25 +52,28 @@ class DisplayMethod(QtGui.QWidget):
# "background-color: %s ; " %self.ClientObj.method_background_color +\
# "background-image: transparent" \
"background-image: url(/usr/share/apps/kwin/calculatecubecap.png); "\
"background-position: center center; "\
# "background-attachment: fixed; "\
# "background-position: center right; "\
"background-attachment: fixed; "\
"background-repeat: no-repeat; "\
"opacity: 200" \
# "alternate-background-color: rgba(255, 255, 255, 150);"\
" }")
self.setStyleSheet("QWidget "\
"{ "\
# "background-color: rgba(255, 255, 255, 255) ; " \
# "background-color: %s ; " %self.ClientObj.method_background_color +\
"background-color: transparent ; "\
"background-image: transparent" \
# "background-image: url(/usr/share/apps/kwin/calculatecubecap.png); "\
# "background-position: center center; "\
# "background-attachment: fixed; "\
"background-repeat: no-repeat; "\
# "alternate-background-color: rgba(255, 255, 255, 150);"\
" }")
# "border-image: url(:'/usr/share/apps/kwin/calculatecubecap.png') 1 ;}" \
# self.parent.setWindowOpacity(0.0)
# self.setStyleSheet("QWidget "\
# "{ "\
## "background-color: rgba(255, 255, 255, 255) ; " \
## "background-color: %s ; " %self.ClientObj.method_background_color +\
# "background-color: transparent ; "\
# "background-image: transparent" \
## "background-image: url(/usr/share/apps/kwin/calculatecubecap.png); "\
## "background-position: center center; "\
## "background-attachment: fixed; "\
# "background-repeat: no-repeat; "\
## "alternate-background-color: rgba(255, 255, 255, 150);"\
# " }")
## "border-image: url(:'/usr/share/apps/kwin/calculatecubecap.png') 1 ;}" \
# transform a list into the dictionary {'group': [methods], ...}
@ -163,8 +166,12 @@ class DisplayMethod(QtGui.QWidget):
group_name = group.split('.')[0].encode('utf-8')
sub_group = group.split('.')[1].encode('utf-8')
# for i in range (10):
# self.layout_dict[group_name].addWidget(QtGui.QPushButton('RRR'))
for i in range (30):
self.layout_dict[group_name].addWidget(ButtonMenu \
('gggggggg',\
'qqqqwwwwwww', \
'code-block', \
self))
self.layout_dict[group_name].addWidget \
(self.button_list[sub_group]\
[len(self.button_list[sub_group]) - 1])
@ -178,8 +185,8 @@ class DisplayMethod(QtGui.QWidget):
self.groupbox_dict[group_name] = None
continue
elif self.groupbox_dict[group]:
self.layout.addWidget(self.groupbox_dict[group])
self.groupbox_dict[group] = None
self.layout.addWidget(self.groupbox_dict[group])
self.groupbox_dict[group] = None
self.layout.setAlignment(QtCore.Qt.AlignTop)
self.setLayout(self.layout)
@ -255,17 +262,17 @@ class DisplayMethodScroll (QtGui.QScrollArea):
# self.set_style(self.MainFrameWgt)
def set_style(self, wgt):
print wgt.styleSheet()
self.setStyleSheet("QWidget "\
"{ "\
"background-color: transparent ; "\
"background-image: url(/usr/share/apps/kwin/calculatecubecap.png); "\
# "background-position: center center; "\
# "background-attachment: fixed; "\
# "background-repeat: no-repeat; "\
# "alternate-background-color: rgba(255, 255, 255, 15%);"\
" }")
# def set_style(self, wgt):
# print wgt.styleSheet()
# self.setStyleSheet("QWidget "\
# "{ "\
# "background-color: transparent ; "\
# "background-image: url(/usr/share/apps/kwin/calculatecubecap.png); "\
## "background-position: center center; "\
## "background-attachment: fixed; "\
## "background-repeat: no-repeat; "\
## "alternate-background-color: rgba(255, 255, 255, 15%);"\
# " }")

Loading…
Cancel
Save