diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 7666f23..c9e804a 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,8 +4,9 @@
-
+
+
@@ -40,16 +41,16 @@
- {
+ "keyToString": {
+ "ASKED_ADD_EXTERNAL_FILES": "true",
+ "Python.main.executor": "Run",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "git-widget-placeholder": "main",
+ "last_opened_file_path": "/home/punix/Pyapps/wire-py",
+ "settings.editor.selected.configurable": "preferences.lookFeel"
}
-}]]>
+}
diff --git a/main.py b/main.py
index 9927f9f..5a47769 100755
--- a/main.py
+++ b/main.py
@@ -23,7 +23,7 @@ class MainWindow(tk.Tk):
self.title('Wire-Py')
self.configure()
self.geometry('%dx%d+%d+%d' % (self.x_width, self.y_height, self.monitor_center_x, self.monitor_center_y))
- self.columnconfigure(2, weight=1)
+ self.columnconfigure(0, weight=1)
self.rowconfigure(0, weight=1)
self.style = ttk.Style(self)
self.style.theme_use('clam')
@@ -60,19 +60,21 @@ class FrameWidgets(ttk.Frame):
self.lb_frame = ttk.Frame(self)
self.lb_frame.configure(relief='solid')
self.lb_frame.grid(column=2, row=2, sticky='snew', padx=20, pady=5)
- self.columnconfigure(0, weight=1)
- self.rowconfigure(0, weight=1)
+ self.columnconfigure(2, weight=1)
+ self.rowconfigure(2, weight=1)
# Label Frame 2
self.lb_frame2 = ttk.Frame(self)
self.lb_frame2.configure(relief='solid')
self.lb_frame2.grid(column=2, row=3, sticky='snew', padx=20, pady=5)
- self.columnconfigure(0, weight=1)
- self.rowconfigure(0, weight=1)
+ self.columnconfigure(2, weight=1)
+ self.rowconfigure(3, weight=1)
# Show active Label
self.select_tunnel = None
self.lb = tk.Label(self, text='Active: ')
self.lb.config(font=("Ubuntu", 11, "bold"))
self.lb.grid(column=2, row=1, padx=15, sticky="w")
+ self.columnconfigure(2, weight=1)
+ self.rowconfigure(1, weight=1)
# Label to Show active Tunnel
self.StrVar = tk.StringVar(value=self.a)
GreenLabel.green_show_label(self)
@@ -80,10 +82,14 @@ class FrameWidgets(ttk.Frame):
self.interface = tk.Label(self.lb_frame, text='Interface', fg=fontcolor)
self.interface.grid(column=0, row=4, sticky="we", padx=120)
self.interface.config(font=("Ubuntu", 9))
+ self.columnconfigure(0, weight=1)
+ self.rowconfigure(4, weight=1)
# Peer Label
self.peer = tk.Label(self.lb_frame2, text='Peer', fg=fontcolor)
self.peer.config(font=("Ubuntu", 9))
self.peer.grid(column=0, row=7, sticky="we", padx=130)
+ self.columnconfigure(0, weight=1)
+ self.rowconfigure(7, weight=1)
# Listbox with Scrollbar
self.scrollbar = ttk.Scrollbar(self)
self.l_box = tk.Listbox(self, fg='#606060', selectmode='single')
@@ -91,6 +97,8 @@ class FrameWidgets(ttk.Frame):
self.scrollbar.config(command=self.l_box.yview)
self.l_box.config(font=("Ubuntu", 12, "bold"))
self.l_box.grid(column=1, rowspan=3, row=1)
+ self.columnconfigure(1, weight=1)
+ self.rowconfigure(1, weight=1)
# Tunnel List
self.tl = ListTunnels.tl_list()
for tunnels in self.tl:
@@ -117,6 +125,8 @@ class FrameWidgets(ttk.Frame):
# Button Import
self.btn_i = tk.Button(self, image=self.imp_pic, bd=0, command=lambda: ImportTunnel.wg_import_select(self))
self.btn_i.grid(column=0, row=2, padx=15, pady=15)
+ self.columnconfigure(0, weight=1)
+ self.rowconfigure(2, weight=1)
def delete():
try:
@@ -137,14 +147,22 @@ class FrameWidgets(ttk.Frame):
# Button Trash
self.btn_tr = tk.Button(self, image=self.tr_pic, bd=0, command=delete)
self.btn_tr.grid(column=0, row=3, padx=15, pady=15)
+ self.columnconfigure(0, weight=1)
+ self.rowconfigure(3, weight=1)
# Button Export
self.btn_exp = tk.Button(self, image=self.exp_pic, bd=0, command=ExportTunnels.wg_export)
self.btn_exp.grid(column=0, row=4, padx=15, pady=15)
+ self.columnconfigure(0, weight=1)
+ self.rowconfigure(4, weight=1)
# Check Buttons
self.wg_autostart = tk.Checkbutton(self, text='Autoconnect on PC Start')
self.wg_autostart.grid(column=1, rowspan=3, row=3)
+ self.columnconfigure(1, weight=1)
+ self.rowconfigure(3, weight=1)
self.wg_update = tk.Checkbutton(self, text='Search automatically for\nWire-Py updates')
self.wg_update.grid(column=1, rowspan=3, row=4)
+ self.columnconfigure(1, weight=1)
+ self.rowconfigure(4, weight=1)
def wg_switch(self):
self.a = TunnelActiv.active()
diff --git a/wg_func.py b/wg_func.py
index 5a337ed..b1b9e12 100755
--- a/wg_func.py
+++ b/wg_func.py
@@ -42,6 +42,8 @@ class GreenLabel(tk.Tk):
self.lb_tunnel = tk.Label(self, textvariable=self.StrVar, fg='green')
self.lb_tunnel.config(font=("Ubuntu", 11, "bold"))
self.lb_tunnel.grid(column=2, padx=10, row=1)
+ self.columnconfigure(2, weight=1)
+ self.rowconfigure(1, weight=1)
class StartStopBTN(tk.Tk):
@@ -55,12 +57,14 @@ class StartStopBTN(tk.Tk):
def button_stop(self):
self.btn_stst = tk.Button(self, image=self.wg_vpn_stop, bd=0, command=self.wg_switch)
self.btn_stst.grid(column=0, row=1, padx=15, pady=10, sticky="s")
- self.rowconfigure(0, weight=1)
+ self.columnconfigure(0, weight=1)
+ self.rowconfigure(1, weight=1)
def button_start(self):
self.btn_stst = tk.Button(self, image=self.wg_vpn_start, bd=0, command=self.wg_switch)
self.btn_stst.grid(column=0, row=1, padx=15, pady=10, sticky="s")
- self.rowconfigure(0, weight=1)
+ self.columnconfigure(0, weight=1)
+ self.rowconfigure(1, weight=1)
class ConToDict: