Skip to content

Commit

Permalink
remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
kanishka-linux committed Jan 29, 2018
1 parent d3f327f commit e2ecfa0
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions kawaii_player/widgets/scrollwidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ def sizeAdjust(self, nextR, direction):
elif direction == "backward":
prevR = nextR + 1
if prevR >= 0 and prevR < ui.list1.count():
p1 = "ui.label_"+str(prevR)+".setMinimumSize("+wi+", "+hi+")"
#exec (p1)
p1 = "ui.label_"+str(prevR)+".setMaximumSize("+wi+", "+hi+")"
#exec (p1)
ht1 = (0.6*int(hi))
wd1 = (0.6*int(wi))
ht = str(ht1)
Expand Down Expand Up @@ -106,8 +102,6 @@ def sizeAdjust(self, nextR, direction):

ui.scrollArea.verticalScrollBar().setValue(yy-ht1)
ui.scrollArea.horizontalScrollBar().setValue(xy-wd1)
p1 = "ui.label_"+str(nextR)+".setMinimumSize("+wd+", "+ht+")"
p1 = "ui.label_"+str(nextR)+".setMaximumSize("+wd+", "+ht+")"
item = ui.list1.item(self.cur_row)
if item:
ui.labelFrame2.setText('{0}. {1}'.format(self.cur_row+1, item.text()))
Expand Down Expand Up @@ -231,10 +225,9 @@ def sizeAdjust(self, nextR, direction):
ui.list2.setCurrentRow(nextR)
try:
p1 = "ui.label_epn_"+str(nextR)+".y()"
yy=eval(p1)

yy = eval(p1)
p1 = "ui.label_epn_"+str(nextR)+".x()"
xy=eval(p1)
xy = eval(p1)
p1 = "ui.label_epn_"+str(nextR)+".setFocus()"
exec (p1)
new_cnt = str(nextR+ui.list2.count())
Expand Down Expand Up @@ -270,8 +263,6 @@ def sizeAdjust(self, nextR, direction):
elif direction == "backward":
prevR = nextR + 1
if prevR >= 0 and prevR < ui.list2.count():
#p1 = "ui.label_epn_"+str(prevR)+".setMinimumSize("+wi+", "+hi+")"
#p1 = "ui.label_epn_"+str(prevR)+".setMaximumSize("+wi+", "+hi+")"
ht1 = (0.6*int(hi))
wd1 = (0.6*int(wi))
ht = str(ht1)
Expand Down Expand Up @@ -301,15 +292,13 @@ def sizeAdjust(self, nextR, direction):
print("wd="+wd)
else:
p1 = "ui.label_epn_"+str(nextR)+".width()"
wd1=eval(p1)
wd1 = eval(p1)
p1 = "ui.label_epn_"+str(nextR)+".height()"
ht1=eval(p1)
ht1 = eval(p1)
ht = str(0.6*ht1)
wd = str(0.6*wd1)
ui.scrollArea1.verticalScrollBar().setValue(yy-ht1)
ui.scrollArea1.horizontalScrollBar().setValue(xy-wd1)
p1 = "ui.label_epn_"+str(nextR)+".setMinimumSize("+wd+", "+ht+")"
p1 = "ui.label_epn_"+str(nextR)+".setMaximumSize("+wd+", "+ht+")"
site = ui.get_parameters_value(s='site')['site']
if site != "PlayLists":
ui.labelFrame2.setText(ui.list2.currentItem().text())
Expand Down

0 comments on commit e2ecfa0

Please sign in to comment.