mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
fix
This commit is contained in:
parent
c99880272a
commit
491dfb3739
@ -94,7 +94,7 @@ class ButtonBar(QFrame):
|
||||
self.threelayout.addStretch()
|
||||
self._right = __(self.threelayout)
|
||||
self.setLayout(self.threelayout)
|
||||
|
||||
self.cntbtn = 0
|
||||
self.buttons = {}
|
||||
self.stylebuttons = {}
|
||||
self.iconstate = {}
|
||||
@ -211,8 +211,13 @@ class ButtonBar(QFrame):
|
||||
globalconfig["toolbutton"]["buttons"][name]["align"]
|
||||
]
|
||||
button.showinlayout(layout)
|
||||
cnt += button.width()
|
||||
self.parent().setMinimumWidth(cnt)
|
||||
cnt += 1
|
||||
self.cntbtn = cnt
|
||||
self.adjustminwidth()
|
||||
|
||||
def adjustminwidth(self):
|
||||
w = self.cntbtn * self.height() * 2 / 1.5
|
||||
self.parent().setMinimumWidth(int(w))
|
||||
|
||||
|
||||
class QUnFrameWindow(resizableframeless):
|
||||
@ -443,6 +448,7 @@ class QUnFrameWindow(resizableframeless):
|
||||
|
||||
def refreshtoolicon(self):
|
||||
self.titlebar.setFixedHeight(int(globalconfig["buttonsize"] * 1.5))
|
||||
self.titlebar.adjustminwidth()
|
||||
self.titlebar.refreshtoolicon()
|
||||
self.setMinimumHeight(self.titlebar.height() * 2)
|
||||
self.set_color_transparency()
|
||||
|
Loading…
x
Reference in New Issue
Block a user