Skip to content

Commit

Permalink
added function to make company profile url clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
BAndresen committed Feb 29, 2024
1 parent 694b63e commit 7ffb6c6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions toja/views/job_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import customtkinter
import os
from PIL import Image
import webbrowser

from views.theme import Theme
import constants as constant
Expand Down Expand Up @@ -68,6 +69,8 @@ def __init__(self, root, theme: Theme):
self.company_web.grid(row=1, column=0, padx=5, pady=1, sticky='e')
self.company_web_user = customtkinter.CTkLabel(self.job_info_frame, text='', font=theme.main_font_bold)
self.company_web_user.grid(row=1, column=1, padx=5, pady=1, sticky='w')
self.company_web_user.bind("<Button-1>", self.open_link)
self.company_web_user.configure(cursor="hand2", text_color=theme.button_color)

self.location = customtkinter.CTkLabel(self.job_info_frame, text="Location:")
self.location.grid(row=2, column=0, padx=5, pady=1, stick='e')
Expand Down Expand Up @@ -192,3 +195,8 @@ def __init__(self, root, theme: Theme):
height=35,
fg_color=theme.button_color, hover_color='grey15')
self.edit_job_button.grid(row=0, column=0, pady=6, padx=6)

def open_link(self, event):
webbrowser.open(self.company_web_user.cget("text"))


0 comments on commit 7ffb6c6

Please sign in to comment.