From 9717dc4e172f062b492b6f76d8f4364993a74da7 Mon Sep 17 00:00:00 2001 From: Kraust Date: Mon, 25 Mar 2024 12:54:27 -0400 Subject: [PATCH 1/4] Added Combat Time to Copy Summary. (#29) --- OSCRUI/datafunctions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OSCRUI/datafunctions.py b/OSCRUI/datafunctions.py index ba4a56b..18ca6f6 100644 --- a/OSCRUI/datafunctions.py +++ b/OSCRUI/datafunctions.py @@ -100,10 +100,14 @@ def copy_summary_callback(self): if not self.parser1.active_combat: return + duration = self.parser1.active_combat.duration + duration = f"{duration.total_seconds()/60:02.0f}:{duration.total_seconds()%60:02.0f}" + parts = [ "OSCR", f"{self.parser1.active_combat.map}", f"{self.parser1.active_combat.difficulty}", + duration, "DPS", ] players = sorted( From 56d12ac9a4bd9a1ad186bf696e91ac5974b38f1a Mon Sep 17 00:00:00 2001 From: Shinga13 <93780215+Shinga13@users.noreply.github.com> Date: Mon, 25 Mar 2024 20:02:54 +0100 Subject: [PATCH 2/4] Featues - added combat time to Live parser copy - added border to "STO Logpath" button on settings page --- OSCRUI/app.py | 5 +++-- OSCRUI/callbacks.py | 4 ++-- main.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/OSCRUI/app.py b/OSCRUI/app.py index cde4c8e..a2a884e 100644 --- a/OSCRUI/app.py +++ b/OSCRUI/app.py @@ -1064,8 +1064,9 @@ def setup_settings_frame(self): if self.settings.value('auto_scan', type=bool): auto_scan_button.flip() col_2.addWidget(auto_scan_button, 6, 1, alignment=ALEFT | AVCENTER) - sto_log_path_button = self.create_button( - 'STO Logfile:', style_override={'margin': 0, 'font': '@subhead'}) + sto_log_path_button = self.create_button('STO Logfile:', style_override={ + 'margin': 0, 'font': '@subhead', 'border-color': '@bc', 'border-style': 'solid', + 'border-width': '@bw'}) col_2.addWidget(sto_log_path_button, 7, 0, alignment=ARIGHT | AVCENTER) sto_log_path_entry = self.create_entry( self.settings.value('sto_log_path'), style_override={'margin-top': 0}) diff --git a/OSCRUI/callbacks.py b/OSCRUI/callbacks.py index bf099d0..73bbbc9 100644 --- a/OSCRUI/callbacks.py +++ b/OSCRUI/callbacks.py @@ -240,6 +240,6 @@ def copy_live_data_callback(self): visible_columns.append(self.settings.value(f'live_columns|{i}', type=bool)) output = list() for player_name, row in zip(index_data, cell_data): - output.append(f"{player_name}: {row[0]:,.2f}") - output = '< OSCR > DPS: ' + ' | '.join(output) + output.append(f"{player_name}: {row[0]:,.2f} ({row[1]:.1f}s)") + output = '< OSCR > DPS (Combat time): ' + ' | '.join(output) self.app.clipboard().setText(output) diff --git a/main.py b/main.py index 05a1046..a1da3ad 100644 --- a/main.py +++ b/main.py @@ -6,7 +6,7 @@ class Launcher(): - version = '2024.3b222' + version = '2024.3b250' __version__ = '0.1' # holds the style of the app From a8ec357e4b926a23a6e8e63caf626d64d1d9a488 Mon Sep 17 00:00:00 2001 From: Shinga13 <93780215+Shinga13@users.noreply.github.com> Date: Tue, 26 Mar 2024 18:11:27 +0100 Subject: [PATCH 3/4] Update to match OSCR update - passed "seconds_between_combats" to LiveParser for combat splitting --- OSCRUI/app.py | 7 +++++++ OSCRUI/subwindows.py | 3 ++- main.py | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/OSCRUI/app.py b/OSCRUI/app.py index a2a884e..9365a25 100644 --- a/OSCRUI/app.py +++ b/OSCRUI/app.py @@ -152,6 +152,13 @@ def parser_settings(self) -> dict: settings[setting_key] = setting settings['templog_folder_path'] = self.config['templog_folder_path'] return settings + + @property + def live_parser_settings(self) -> dict: + """ + Returns settings relevant to the LiveParser + """ + return {'seconds_between_combats': self.settings.value('seconds_between_combats', type=int)} @property def sidebar_item_width(self) -> int: diff --git a/OSCRUI/subwindows.py b/OSCRUI/subwindows.py index 3567010..4b8d27f 100644 --- a/OSCRUI/subwindows.py +++ b/OSCRUI/subwindows.py @@ -189,7 +189,8 @@ def live_parser_toggle(self, activate): data_buffer = [] data_field = FIELD_INDEX_CONVERSION[self.settings.value('live_graph_field', type=int)] self.live_parser = LiveParser(log_path, update_callback=lambda data: update_live_display( - self, data, graph_active, data_buffer, data_field)) + self, data, graph_active, data_buffer, data_field), + settings=self.live_parser_settings) create_live_parser_window(self) else: try: diff --git a/main.py b/main.py index a1da3ad..ca787d5 100644 --- a/main.py +++ b/main.py @@ -6,7 +6,7 @@ class Launcher(): - version = '2024.3b250' + version = '2024.3b260' __version__ = '0.1' # holds the style of the app From d7bd6d7a7a4cc208f065c1868d4d88a4d66edfa8 Mon Sep 17 00:00:00 2001 From: Shinga13 <93780215+Shinga13@users.noreply.github.com> Date: Wed, 27 Mar 2024 21:25:27 +0100 Subject: [PATCH 4/4] Features - overview table now shows on all three tabs and is collapsible - added setting to select which graph comes up first - properly disabled upload functionality - fixed a bug that desynchronized main and sudebar tabber as well as overview tabber and overview tab buttons --- OSCRUI/app.py | 81 ++++++++++++++++++++++++++++---------- OSCRUI/callbacks.py | 18 +++++++++ OSCRUI/datafunctions.py | 5 ++- OSCRUI/displayer.py | 22 +++++++---- OSCRUI/leagueconnector.py | 2 + OSCRUI/widgets.py | 32 ++++++++++----- assets/collapse-bottom.svg | 5 +++ assets/collapse-top.svg | 5 +++ assets/expand-bottom.svg | 5 +++ assets/expand-top.svg | 5 +++ main.py | 28 +++++++++---- 11 files changed, 161 insertions(+), 47 deletions(-) create mode 100644 assets/collapse-bottom.svg create mode 100644 assets/collapse-top.svg create mode 100644 assets/expand-bottom.svg create mode 100644 assets/expand-top.svg diff --git a/OSCRUI/app.py b/OSCRUI/app.py index 9365a25..2579340 100644 --- a/OSCRUI/app.py +++ b/OSCRUI/app.py @@ -22,10 +22,11 @@ class OSCRUI(): - from .callbacks import browse_log, browse_sto_logpath, favorite_button_callback - from .callbacks import navigate_log, save_combat, set_graph_resolution_setting - from .callbacks import set_sto_logpath_setting, set_parser_opacity_setting, switch_analysis_tab - from .callbacks import switch_main_tab, switch_map_tab, switch_overview_tab + from .callbacks import ( + browse_log, browse_sto_logpath, collapse_overview_table, expand_overview_table, + favorite_button_callback, navigate_log, save_combat, set_graph_resolution_setting, + set_sto_logpath_setting, set_parser_opacity_setting, switch_analysis_tab, + switch_main_tab, switch_map_tab, switch_overview_tab) from .datafunctions import analyze_log_callback, copy_analysis_callback from .datafunctions import copy_summary_callback, init_parser, update_shown_columns_dmg from .datafunctions import update_shown_columns_heal @@ -112,7 +113,11 @@ def cache_assets(self): 'star': 'star.svg', 'stocd': 'section31badge.png', 'stobuilds': 'stobuildslogo.png', - 'close': 'close.svg' + 'close': 'close.svg', + 'expand-top': 'expand-top.svg', + 'collapse-top': 'collapse-top.svg', + 'expand-bottom': 'expand-bottom.svg', + 'collapse-bottom': 'collapse-bottom.svg', } self.icons = load_icon_series(icons, self.app_dir) @@ -234,22 +239,45 @@ def setup_main_layout(self): right.hide() content_layout.addWidget(right, 0, 4) + csp = self.theme['defaults']['csp'] + col_1 = QVBoxLayout() + col_1.setContentsMargins(csp, csp, csp, csp) + content_layout.addLayout(col_1, 0, 1) + col_3 = QVBoxLayout() + col_3.setContentsMargins(csp, csp, csp, csp) + content_layout.addLayout(col_3, 0, 3) icon_size = self.theme['s.c']['button_icon_size'] left_flip_config = { 'icon_r': self.icons['collapse-left'], 'func_r': left.hide, - 'icon_l': self.icons['expand-left'], 'func_l': left.show + 'icon_l': self.icons['expand-left'], 'func_l': left.show, + 'tooltip_r': 'Collapse Sidebar', 'tooltip_l': 'Expand Sidebar' } right_flip_config = { 'icon_r': self.icons['expand-right'], 'func_r': right.show, - 'icon_l': self.icons['collapse-right'], 'func_l': right.hide + 'icon_l': self.icons['collapse-right'], 'func_l': right.hide, + 'tooltip_r': 'Expand', 'tooltip_l': 'Collapse' } - for col, config in ((1, left_flip_config), (3, right_flip_config)): + for col, config in ((col_1, left_flip_config), (col_3, right_flip_config)): flip_button = FlipButton('', '', main_frame) flip_button.configure(config) flip_button.setIconSize(QSize(icon_size, icon_size)) flip_button.setStyleSheet(self.get_style_class('QPushButton', 'small_button')) flip_button.setSizePolicy(SMAXMAX) - content_layout.addWidget(flip_button, 0, col, alignment=ATOP) + col.addWidget(flip_button, alignment=ATOP) + + table_flip_config = { + 'icon_r': self.icons['collapse-bottom'], 'tooltip_r': 'Collapse Table', + 'func_r': self.collapse_overview_table, + 'icon_l': self.icons['expand-bottom'], 'tooltip_l': 'Expand_Table', + 'func_l': self.expand_overview_table + } + table_button = FlipButton('', '', main_frame) + table_button.configure(table_flip_config) + table_button.setIconSize(QSize(icon_size, icon_size)) + table_button.setStyleSheet(self.get_style_class('QPushButton', 'small_button')) + table_button.setSizePolicy(SMAXMAX) + col_1.addWidget(table_button, alignment=ABOTTOM) + self.widgets.overview_table_button = table_button center = self.create_frame(main_frame, 'frame') center.setSizePolicy(SMINMIN) @@ -620,9 +648,9 @@ def setup_overview_frame(self): Sets up the frame housing the combatlog overview """ o_frame = self.widgets.main_tab_frames[0] - bar_frame = self.create_frame(None, 'frame') - dps_graph_frame = self.create_frame(None, 'frame') - dmg_graph_frame = self.create_frame(None, 'frame') + bar_frame = self.create_frame() + dps_graph_frame = self.create_frame() + dmg_graph_frame = self.create_frame() self.widgets.overview_tab_frames.append(bar_frame) self.widgets.overview_tab_frames.append(dps_graph_frame) self.widgets.overview_tab_frames.append(dmg_graph_frame) @@ -639,7 +667,7 @@ def setup_overview_frame(self): o_tabber.addTab(bar_frame, 'BAR') o_tabber.addTab(dps_graph_frame, 'DPS') o_tabber.addTab(dmg_graph_frame, 'DMG') - layout.addWidget(o_tabber) + layout.addWidget(o_tabber, stretch=self.theme['s.c']['overview_graph_stretch']) switch_layout.setColumnStretch(0, 1) switch_frame = self.create_frame(o_frame, 'frame') @@ -661,7 +689,7 @@ def setup_overview_frame(self): switch_frame.setLayout(switcher) self.widgets.overview_menu_buttons = buttons icon_layout = QHBoxLayout() - icon_layout.setContentsMargins(0, 0, self.theme['defaults']['margin'], 0) + icon_layout.setContentsMargins(0, 0, 0, 0) icon_layout.setSpacing(self.theme['defaults']['csp']) copy_button = self.create_icon_button(self.icons['copy'], 'Copy Result') copy_button.clicked.connect(self.copy_summary_callback) @@ -671,6 +699,9 @@ def setup_overview_frame(self): icon_layout.addWidget(ladder_button) switch_layout.addLayout(icon_layout, 0, 2, alignment=ARIGHT | ABOTTOM) switch_layout.setColumnStretch(2, 1) + table_frame = self.create_frame(size_policy=SMINMIN) + layout.addWidget(table_frame, stretch=self.theme['s.c']['overview_table_stretch']) + self.widgets.overview_table_frame = table_frame o_frame.setLayout(layout) self.widgets.overview_tabber = o_tabber @@ -727,7 +758,7 @@ def setup_analysis_frame(self): switch_frame.setLayout(switcher) self.widgets.analysis_menu_buttons = buttons copy_layout = QHBoxLayout() - copy_layout.setContentsMargins(0, 0, self.theme['defaults']['margin'], 0) + copy_layout.setContentsMargins(0, 0, 0, 0) copy_layout.setSpacing(self.theme['defaults']['csp']) copy_combobox = self.create_combo_box(switch_frame) copy_combobox.addItems(('Selection', 'Max One Hit', 'Magnitude', 'Magnitude / s')) @@ -823,7 +854,7 @@ def setup_league_standings_frame(self): layout.setSpacing(0) ladder_table = QTableView(l_frame) - self.style_table(ladder_table, {'margin': '@margin'}, single_row_selection=True) + self.style_table(ladder_table, {'margin-top': '@isp'}, single_row_selection=True) self.widgets.ladder_table = ladder_table layout.addWidget(ladder_table, stretch=1) @@ -1066,8 +1097,8 @@ def setup_settings_frame(self): auto_scan_button.setStyleSheet(self.get_style_class( 'QPushButton', 'toggle_button', override={'margin-top': 0, 'margin-left': 0})) auto_scan_button.setFont(self.theme_font('app', '@font')) - auto_scan_button.set_func_r(lambda: self.settings.setValue('auto_scan', True)) - auto_scan_button.set_func_l(lambda: self.settings.setValue('auto_scan', False)) + auto_scan_button.r_function = lambda: self.settings.setValue('auto_scan', True) + auto_scan_button.l_function = lambda: self.settings.setValue('auto_scan', False) if self.settings.value('auto_scan', type=bool): auto_scan_button.flip() col_2.addWidget(auto_scan_button, 6, 1, alignment=ALEFT | AVCENTER) @@ -1096,9 +1127,9 @@ def setup_settings_frame(self): live_graph_active_button.setStyleSheet(self.get_style_class( 'QPushButton', 'toggle_button', override={'margin-top': 0, 'margin-left': 0})) live_graph_active_button.setFont(self.theme_font('app', '@font')) - live_graph_active_button.set_func_r( + live_graph_active_button.r_function = ( lambda: self.settings.setValue('live_graph_active', True)) - live_graph_active_button.set_func_l( + live_graph_active_button.l_function = ( lambda: self.settings.setValue('live_graph_active', False)) if self.settings.value('live_graph_active', type=bool): live_graph_active_button.flip() @@ -1112,6 +1143,16 @@ def setup_settings_frame(self): live_graph_field_combo.currentIndexChanged.connect( lambda new_index: self.settings.setValue('live_graph_field', new_index)) col_2.addWidget(live_graph_field_combo, 10, 1, alignment=ALEFT) + overview_tab_label = self.create_label('Default Overview Tab:', 'label_subhead') + col_2.addWidget(overview_tab_label, 11, 0, alignment=ARIGHT) + overview_tab_combo = self.create_combo_box( + col_2_frame, style_override={'font': '@small_text'}) + overview_tab_combo.addItems(('DPS Bar', 'DPS Graph', 'Damage Graph')) + overview_tab_combo.setCurrentIndex(self.settings.value('first_overview_tab', type=int)) + overview_tab_combo.currentIndexChanged.connect( + lambda new_index: self.settings.setValue('first_overview_tab', new_index)) + col_2.addWidget(overview_tab_combo, 11, 1, alignment=ALEFT) + col_2_frame.setLayout(col_2) diff --git a/OSCRUI/callbacks.py b/OSCRUI/callbacks.py index 73bbbc9..d504f0f 100644 --- a/OSCRUI/callbacks.py +++ b/OSCRUI/callbacks.py @@ -122,6 +122,10 @@ def switch_main_tab(self, tab_index: int): } self.widgets.main_tabber.setCurrentIndex(tab_index) self.widgets.sidebar_tabber.setCurrentIndex(SIDEBAR_TAB_CONVERSION[tab_index]) + if tab_index == 0: + self.widgets.overview_table_button.show() + else: + self.widgets.overview_table_button.hide() def favorite_button_callback(self): @@ -243,3 +247,17 @@ def copy_live_data_callback(self): output.append(f"{player_name}: {row[0]:,.2f} ({row[1]:.1f}s)") output = '< OSCR > DPS (Combat time): ' + ' | '.join(output) self.app.clipboard().setText(output) + + +def expand_overview_table(self): + """ + Shows the overview table + """ + self.widgets.overview_table_frame.show() + + +def collapse_overview_table(self): + """ + Hides the overview table + """ + self.widgets.overview_table_frame.hide() diff --git a/OSCRUI/datafunctions.py b/OSCRUI/datafunctions.py index 18ca6f6..5d6e401 100644 --- a/OSCRUI/datafunctions.py +++ b/OSCRUI/datafunctions.py @@ -4,6 +4,7 @@ from OSCR import OSCR, HEAL_TREE_HEADER, TREE_HEADER from PySide6.QtCore import Qt, QThread, Signal +from .callbacks import switch_main_tab, switch_overview_tab from .datamodels import DamageTreeModel, HealTreeModel, TreeSelectionModel from .displayer import create_overview from .subwindows import log_size_warning, show_warning, split_dialog @@ -88,8 +89,8 @@ def analyze_log_callback(self, combat_id=None, path=None, parser_num: int = 1, h create_overview(self) # reset tabber - self.widgets.main_tabber.setCurrentIndex(0) - self.widgets.overview_tabber.setCurrentIndex(0) + switch_main_tab(self, 0) + switch_overview_tab(self, self.settings.value('first_overview_tab', type=int)) def copy_summary_callback(self): diff --git a/OSCRUI/displayer.py b/OSCRUI/displayer.py index fc03d6a..9097d84 100644 --- a/OSCRUI/displayer.py +++ b/OSCRUI/displayer.py @@ -54,13 +54,12 @@ def plot_wrapper(self, data, time_reference=None): frame.setLayout(inner_layout) outer_layout = QVBoxLayout() outer_layout.setContentsMargins(0, 0, 0, 0) - # if stretch ever needs to be variable, create argument for decorator - outer_layout.addWidget(frame, stretch=11) + outer_layout.addWidget(frame) return outer_layout return plot_wrapper -def _create_overview(combat: Combat) -> tuple: +def extract_overview_data(combat: Combat) -> tuple: ''' converts dictionary containing player data to table data for the front page ''' @@ -88,8 +87,10 @@ def create_overview(self): for frame in self.widgets.overview_tab_frames: if frame.layout(): QWidget().setLayout(frame.layout()) + if self.widgets.overview_table_frame.layout(): + QWidget().setLayout(self.widgets.overview_table_frame.layout()) - time_data, DPS_graph_data, DMG_graph_data, current_table = _create_overview( + time_data, DPS_graph_data, DMG_graph_data, current_table = extract_overview_data( self.parser1.active_combat) line_layout = create_line_graph(self, DPS_graph_data, time_data) @@ -101,8 +102,15 @@ def create_overview(self): bar_layout = create_horizontal_bar_graph(self, current_table) self.widgets.overview_tab_frames[0].setLayout(bar_layout) - tbl = create_overview_table(self, current_table) - bar_layout.addWidget(tbl, stretch=4) + table_layout = QVBoxLayout() + table_layout.setContentsMargins(0, 0, 0 ,0) + table = create_overview_table(self, current_table) + table_layout.addWidget(table) + self.widgets.overview_table_frame.setLayout(table_layout) + table.resizeColumnsToContents() + horizontal_header = table.horizontalHeader() + for col in range(len(TABLE_HEADER)): + horizontal_header.resizeSection(col, horizontal_header.sectionSize(col) + 5) @setup_plot @@ -275,8 +283,6 @@ def create_overview_table(self, table_data) -> QTableView: table = QTableView(self.widgets.overview_tab_frames[0]) table.setModel(sort) style_table(self, table) - for col in range(len(model._header)): - table.horizontalHeader().resizeSection(col, table.horizontalHeader().sectionSize(col) + 5) if self.settings.value('overview_sort_order') == 'Descending': sort_order = Qt.SortOrder.AscendingOrder else: diff --git a/OSCRUI/leagueconnector.py b/OSCRUI/leagueconnector.py index 54b6b1c..48d76fa 100644 --- a/OSCRUI/leagueconnector.py +++ b/OSCRUI/leagueconnector.py @@ -185,6 +185,8 @@ def upload_callback(self): """ Helper function to grab the current combat and upload it to the backend. """ + show_warning(self, 'OSCR', 'Uploads are temporarily disabled.') + return if self.parser1.active_combat is None or self.parser1.active_combat.log_data is None: show_warning(self, 'OSCR - Logfile Upload', 'No data to upload.') return diff --git a/OSCRUI/widgets.py b/OSCRUI/widgets.py index 10f7e96..1bbfbd9 100644 --- a/OSCRUI/widgets.py +++ b/OSCRUI/widgets.py @@ -28,6 +28,8 @@ def __init__(self): self.overview_menu_buttons: list[QPushButton] = list() self.overview_tabber: QTabWidget self.overview_tab_frames: list[QFrame] = list() + self.overview_table_frame: QFrame + self.overview_table_button: FlipButton self.analysis_menu_buttons: list[QPushButton] = list() self.analysis_copy_combobox: QComboBox @@ -71,27 +73,31 @@ def __init__(self, r_text, l_text, parent, checkable=False, *ar, **kw): self._r_text = r_text self._l_text = l_text self.setText(r_text) - self._r_function = self._f - self._l_function = self._f + self.r_function = self._f + self.l_function = self._f self._r_icon = None self._l_icon = None + self._r_tooltip = '' + self._l_tooltip = '' self.clicked.connect(self.flip) @Slot() def flip(self): if self._r: - self._r_function() + self.r_function() if self._l_icon is not None: self.setIcon(self._l_icon) self.setText(self._l_text) + self.setToolTip(self._l_tooltip) self._r = not self._r if self._checkable: self.setChecked(True) else: - self._l_function() + self.l_function() if self._r_icon is not None: self.setIcon(self._r_icon) self.setText(self._r_text) + self.setToolTip(self._r_tooltip) self._r = not self._r if self._checkable: self.setChecked(False) @@ -116,17 +122,23 @@ def set_text_l(self, text): if not self._r: self.setText(text) - def set_func_r(self, func): - self._r_function = func + def set_tooltip_r(self, text): + self._r_tooltip = text + if self._r: + self.setToolTip(text) - def set_func_l(self, func): - self._l_function = func + def set_tooltip_l(self, text): + self._l_tooltip = text + if not self._r: + self.setToolTip(text) def configure(self, settings): self.set_icon_r(settings['icon_r']) self.set_icon_l(settings['icon_l']) - self.set_func_r(settings['func_r']) - self.set_func_l(settings['func_l']) + self.r_function = settings['func_r'] + self.l_function = settings['func_l'] + self.set_tooltip_r(settings['tooltip_r']) + self.set_tooltip_l(settings['tooltip_l']) def _f(self): return diff --git a/assets/collapse-bottom.svg b/assets/collapse-bottom.svg new file mode 100644 index 0000000..63d01a0 --- /dev/null +++ b/assets/collapse-bottom.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/assets/collapse-top.svg b/assets/collapse-top.svg new file mode 100644 index 0000000..2bc4569 --- /dev/null +++ b/assets/collapse-top.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/assets/expand-bottom.svg b/assets/expand-bottom.svg new file mode 100644 index 0000000..1c0a0c5 --- /dev/null +++ b/assets/expand-bottom.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/assets/expand-top.svg b/assets/expand-top.svg new file mode 100644 index 0000000..c911b86 --- /dev/null +++ b/assets/expand-top.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/main.py b/main.py index ca787d5..46218c8 100644 --- a/main.py +++ b/main.py @@ -6,7 +6,7 @@ class Launcher(): - version = '2024.3b260' + version = '2024.3b270' __version__ = '0.1' # holds the style of the app @@ -53,7 +53,7 @@ class Launcher(): # top left corner of table 'QTableCornerButton::section': { 'background-color': '#1a1a1a' - } + }, } }, # shortcuts, @bg -> means bg in this sub-dictionary @@ -195,10 +195,21 @@ class Launcher(): 'background': 'none', 'border': 'none', 'border-radius': 3, - 'margin': (4, 2, 1, 4), + 'margin': 0, 'padding': (2, 0, 2, 0), ':hover': { 'background-color': 'rgba(136,136,136,.2)' + }, + # Tooltip + '~QToolTip': { + 'background-color': '@mbg', + 'border-style': 'solid', + 'border-color': '@lbg', + 'border-width': '@bw', + 'padding': (0, 0, 0, 0), + 'margin': (0, 0, 0, 0), + 'color': '@fg', + 'font': 'Overpass' } }, # button that holds icon @@ -354,7 +365,7 @@ class Launcher(): 'border-color': '@bc', 'gridline-color': 'rgba(0,0,0,0)', # -> s.c: table_gridline 'outline': '0', # removes dotted line around clicked item - 'margin': (0, 10, 10, 0), + 'margin': (0, 0, 10, 0), 'font': ('Roboto Mono', 12, 'Medium'), '::item': { 'padding': (0, 5, 0, 5), @@ -444,7 +455,7 @@ class Launcher(): 'background-color': '@bg', 'alternate-background-color': '@mbg', 'color': '@fg', - 'margin': (10, 10, 10, 0), + 'margin': (5, 0, 15, 0), 'outline': '0', # removes dotted line around clicked item 'font': ('Overpass', 12, 'Normal'), '::item': { @@ -544,7 +555,7 @@ class Launcher(): 'border-style': 'solid', 'border-width': '@bw', 'border-color': '@bc', - 'margin': (10, 10, 10, 0), + 'margin': (10, 0, 10, 0), 'padding': 10, 'font': ('Overpass', 10, 'bold') }, @@ -650,6 +661,8 @@ class Launcher(): 'button_icon_size': 24, 'table_alternate': True, 'table_gridline': False, + 'overview_graph_stretch': 12, + 'overview_table_stretch': 3 } } @@ -734,7 +747,8 @@ def app_config() -> dict: 'live_columns|6': False, 'live_parser_opacity': 0.85, 'live_graph_active': False, - 'live_graph_field': 0 + 'live_graph_field': 0, + 'first_overview_tab': 0, } } return config