Native gui make almost every data editable
This commit is contained in:
1 parent
b8ac8d0185
commit
1a6674c819
48 files changed
+2168
-737
No files matched your search
+8
-4
@@ -126,9 +126,9 @@ class BoxesView(View):
|
||||
self.sbox.sid = combobox.get_list_value(self.combo['storage'])
|
||||
self.sbox.boxtype = combobox.get_list_value(self.combo['type'])
|
||||
self.sbox.content = self.entry['content'].get_text()
|
||||
self.sbox.wx = int(self.spin['wx'].get_value())
|
||||
self.sbox.wy = int(self.spin['wy'].get_value())
|
||||
self.sbox.wz = int(self.spin['wz'].get_value())
|
||||
self.sbox.wx = self.spin['wx'].get_value_as_int()
|
||||
self.sbox.wy = self.spin['wy'].get_value_as_int()
|
||||
self.sbox.wz = self.spin['wz'].get_value_as_int()
|
||||
self.sbox.color = self.entry['color'].get_text().lstrip('#')
|
||||
self.sbox.price = self.spin['price'].get_value()
|
||||
self.sbox.weight = self.spin['weight'].get_value()
|
||||
@@ -203,8 +203,12 @@ class BoxesView(View):
|
||||
r = round(rgba.red * 255)
|
||||
g = round(rgba.green * 255)
|
||||
b = round(rgba.blue * 255)
|
||||
a = round(rgba.alpha * 255)
|
||||
#self.last_valid_rgb = f"{r:02X}{g:02X}{b:02X}"
|
||||
self.entry['color'].set_text(f"#{r:02X}{g:02X}{b:02X}")
|
||||
if a > 0:
|
||||
self.entry['color'].set_text(f"#{r:02X}{g:02X}{b:02X}")
|
||||
else:
|
||||
self.entry['color'].set_text('')
|
||||
|
||||
def on_ent_color_activate(self, entry):
|
||||
self.set_color_from_entry(entry)
|
||||
|
||||
Reference in new issue
Block a user