aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-05-20 21:58:17 +0200
committerAdrian Kummerlaender2019-05-20 21:58:17 +0200
commiteefdbf79bc2b83b40477abf102f5722f73f31741 (patch)
treed6091a45f0ad48ea9a6fcf91ad72cd887a2e98f9
parent863203d5d7b42c2489b8338485aa0b649f003ce2 (diff)
downloadsymlbm_playground-eefdbf79bc2b83b40477abf102f5722f73f31741.tar
symlbm_playground-eefdbf79bc2b83b40477abf102f5722f73f31741.tar.gz
symlbm_playground-eefdbf79bc2b83b40477abf102f5722f73f31741.tar.bz2
symlbm_playground-eefdbf79bc2b83b40477abf102f5722f73f31741.tar.lz
symlbm_playground-eefdbf79bc2b83b40477abf102f5722f73f31741.tar.xz
symlbm_playground-eefdbf79bc2b83b40477abf102f5722f73f31741.tar.zst
symlbm_playground-eefdbf79bc2b83b40477abf102f5722f73f31741.zip
Change parameter window into dialog
-rw-r--r--fieldicle.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/fieldicle.py b/fieldicle.py
index 347d8e6..6e2bd9b 100644
--- a/fieldicle.py
+++ b/fieldicle.py
@@ -1,5 +1,3 @@
-from __future__ import absolute_import
-
import pyopencl as cl
mf = cl.mem_flags
from pyopencl.tools import get_gl_sharing_context_properties
@@ -183,14 +181,11 @@ particleWindow = ParticleWindow()
glfwThread = threading.Thread(target=particleWindow.run)
glfwThread.start()
-class ParamWindow(Gtk.Window):
+class ParamWindow(Gtk.Dialog):
def __init__(self, particleWin):
- Gtk.Window.__init__(self, title="Field Parameters")
+ Gtk.Dialog.__init__(self, title="Field Parameters")
self.particleWin = particleWin
- self.grid = Gtk.Grid()
- self.add(self.grid)
-
self.button = Gtk.Button(label="Update field")
self.button.connect("clicked", self.on_button_clicked)
@@ -198,10 +193,10 @@ class ParamWindow(Gtk.Window):
self.entryFy = Gtk.Entry()
self.entryFz = Gtk.Entry()
- self.grid.add(self.button)
- self.grid.add(self.entryFx)
- self.grid.add(self.entryFy)
- self.grid.add(self.entryFz)
+ self.get_content_area().add(self.button)
+ self.get_content_area().add(self.entryFx)
+ self.get_content_area().add(self.entryFy)
+ self.get_content_area().add(self.entryFz)
def on_button_clicked(self, widget):
self.particleWin.updateField(