Resize the window and buttons

Resized the plugin window popup and also moved the buttons to limit the overlapping with the description.
This commit is contained in:
Sravan 2023-03-04 13:01:48 +05:30
parent 820900d574
commit 71479e5b5e

View file

@ -816,9 +816,9 @@ class PluginWindow(popup.PopupWindow):
play_sound()
b_text_color = (0.75, 0.7, 0.8)
s = 1.1 if _uiscale is ba.UIScale.SMALL else 1.27 if ba.UIScale.MEDIUM else 1.57
s = 1.25 if _uiscale is ba.UIScale.SMALL else 1.39 if ba.UIScale.MEDIUM else 1.67
width = 360 * s
height = 100 + 100 * s
height = 120 + 100 * s
color = (1, 1, 1)
text_scale = 0.7 * s
self._transition_out = 'out_scale'
@ -933,10 +933,10 @@ class PluginWindow(popup.PopupWindow):
ba.containerwidget(edit=self._root_widget,
on_cancel_call=self._ok)
open_pos_x = (300 if _uiscale is ba.UIScale.SMALL else
360 if _uiscale is ba.UIScale.MEDIUM else 350)
open_pos_y = (100 if _uiscale is ba.UIScale.SMALL else
110 if _uiscale is ba.UIScale.MEDIUM else 120)
open_pos_x = (350 if _uiscale is ba.UIScale.SMALL else
410 if _uiscale is ba.UIScale.MEDIUM else 400)
open_pos_y = (125 if _uiscale is ba.UIScale.SMALL else
135 if _uiscale is ba.UIScale.MEDIUM else 140)
open_button = ba.buttonwidget(parent=self._root_widget,
autoselect=True,
position=(open_pos_x, open_pos_y),
@ -970,8 +970,8 @@ class PluginWindow(popup.PopupWindow):
text=text,
action=lambda: ba.open_url(self.plugin.info["external_url"]),
)
open_pos_x = (350 if _uiscale is ba.UIScale.SMALL else
410 if _uiscale is ba.UIScale.MEDIUM else 400)
open_pos_x = (400 if _uiscale is ba.UIScale.SMALL else
460 if _uiscale is ba.UIScale.MEDIUM else 450)
open_pos_y = (100 if _uiscale is ba.UIScale.SMALL else
110 if _uiscale is ba.UIScale.MEDIUM else 120)
open_button = ba.buttonwidget(parent=self._root_widget,