Skip to content

Commit

Permalink
use qgridnext
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthak-dv committed Aug 26, 2024
1 parent b08981d commit a185fa7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
14 changes: 7 additions & 7 deletions tardis/visualization/widgets/util.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Utility classes and functions for widgets."""

import logging
import qgrid
import qgridnext as qgrid
import ipywidgets as ipw
import asyncio

Expand Down Expand Up @@ -180,12 +180,12 @@ def update_and_resize(self, value):
table_width -= 12 # 12px is space consumed by scroll bar of qgrid

# Distribute the table width in proportions of column width to label components
self.widget.children[
0
].layout.width = f"{(table_width) * self.table_col_widths[0]/100}px"
self.widget.children[
1
].layout.width = f"{(table_width) * self.table_col_widths[1]/100}px"
self.widget.children[0].layout.width = (
f"{(table_width) * self.table_col_widths[0]/100}px"
)
self.widget.children[1].layout.width = (
f"{(table_width) * self.table_col_widths[1]/100}px"
)

def _create(self, key, value):
"""
Expand Down
4 changes: 1 addition & 3 deletions tardis_env3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ channels:
- conda-forge

dependencies:

# WARNING: any change to this section must be applied to the conda-forge
# package recipe at https://github.com/conda-forge/tardis-sn-feedstock

Expand Down Expand Up @@ -38,7 +37,7 @@ dependencies:
- matplotlib-base
- ipywidgets
- plotly
- qgrid
- qgridnext

# --- Packages not required for conda-forge recipe ---

Expand Down Expand Up @@ -74,4 +73,3 @@ dependencies:

# Other
- git-lfs

0 comments on commit a185fa7

Please sign in to comment.