diff --git a/requirements.txt b/requirements.txt index a399733d..42f4be2c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,5 @@ customtkinter == 5.2.0 deepl == 1.15.0 flashtext == 2.7 pyyaml == 6.0.1 -python-i18n == 0.3.9 \ No newline at end of file +python-i18n == 0.3.9 +CTkToolTip == 0.8 \ No newline at end of file diff --git a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py index f11c56b5..100b761a 100644 --- a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py +++ b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py @@ -3,6 +3,7 @@ from types import SimpleNamespace from typing import Union from customtkinter import CTkOptionMenu, CTkFont, CTkFrame, CTkLabel, CTkRadioButton, CTkEntry, CTkSlider, CTkSwitch, CTkCheckBox, CTkProgressBar +from CTkToolTip import * from vrct_gui.ui_utils import createButtonWithImage, getLatestWidth, createOptionMenuBox from vrct_gui import vrct_gui @@ -260,11 +261,21 @@ class _SettingBoxGenerator(): ) setattr(self.config_window, slider_attr_name, slider_widget) + slider_tooltip = CTkToolTip( + slider_widget, + message=variable.get(), + delay=0, + bg_color=self.settings.ctm.SB__SLIDER_TOOLTIP_BG_COLOR, + text_color=self.settings.ctm.SB__SLIDER_TOOLTIP_TEXT_COLOR, + font=CTkFont(family=self.settings.FONT_FAMILY, size=self.settings.uism.SB__SLIDER_TOOLTIP_FONT_SIZE, weight="normal"), + ) + slider_widget.grid(row=1, column=SETTING_BOX_COLUMN, sticky="e") if slider_bind__ButtonPress is not None: def adjusted_slider_bind__ButtonPress(_e): command(_e) + slider_tooltip.configure(message=slider_widget.get()) slider_bind__ButtonPress() slider_widget.configure(command=adjusted_slider_bind__ButtonPress) diff --git a/vrct_gui/ui_managers/ColorThemeManager.py b/vrct_gui/ui_managers/ColorThemeManager.py index ab55e996..19f9f884 100644 --- a/vrct_gui/ui_managers/ColorThemeManager.py +++ b/vrct_gui/ui_managers/ColorThemeManager.py @@ -282,6 +282,8 @@ class ColorThemeManager(): self.config_window.SB__SLIDER_PROGRESS_BG_COLOR = self.DARK_500_COLOR self.config_window.SB__SLIDER_BUTTON_COLOR = self.DARK_700_COLOR self.config_window.SB__SLIDER_BUTTON_HOVERED_COLOR = self.DARK_600_COLOR + self.config_window.SB__SLIDER_TOOLTIP_BG_COLOR = self.DARK_850_COLOR + self.config_window.SB__SLIDER_TOOLTIP_TEXT_COLOR = self.DARK_200_COLOR self.config_window.SB__SWITCH_BOX_BG_COLOR = self.DARK_800_COLOR self.config_window.SB__SWITCH_BOX_ACTIVE_BG_COLOR = self.PRIMARY_500_COLOR diff --git a/vrct_gui/ui_managers/UiScalingManager.py b/vrct_gui/ui_managers/UiScalingManager.py index 8f5a9c09..fae26c79 100644 --- a/vrct_gui/ui_managers/UiScalingManager.py +++ b/vrct_gui/ui_managers/UiScalingManager.py @@ -262,6 +262,7 @@ class UiScalingManager(): self.config_window.SB__SLIDER_WIDTH = self._calculateUiSize(200) self.config_window.SB__SLIDER_HEIGHT = self._calculateUiSize(16) + self.config_window.SB__SLIDER_TOOLTIP_FONT_SIZE = self._calculateUiSize(16) self.config_window.SB__PROGRESSBAR_X_SLIDER__ENTRY_WIDTH = self.config_window.RESPONSIVE_UI_SIZE_INT_50 self.config_window.SB__PROGRESSBAR_X_SLIDER__ENTRY_HEIGHT = self.config_window.SB__ENTRY_HEIGHT