napari / napari-animation

A napari plugin for making animations
https://napari.github.io/napari-animation/
Other
76 stars 27 forks source link

Stylesheet fix take 2 #84

Closed tlambert03 closed 3 years ago

tlambert03 commented 3 years ago

a little modification to the stylesheet strategy...

The only reason it was necessary to do all the manual theming in napari-console is because qt_console, rather frustratingly, uses something other than Qt's setStylesheet to set their stylesheet. (see that they have a self.style_sheet attribute that we set here) ... In all other cases, the widget will inherit the stylesheet of its parent. So AnimationWidget will just naturally "look right" when docked in napari, no additional effort required.

KeyFramesListWidget does still need to update theme for now (but I'll submit another PR sometime that may simplify all that too)... here, I just made the stylesheet template look a little bit more like a stylesheet. hope that's ok

codecov[bot] commented 3 years ago

Codecov Report

Merging #84 (1e4f3fe) into main (b946428) will increase coverage by 1.09%. The diff coverage is 16.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
+ Coverage   67.02%   68.11%   +1.09%     
==========================================
  Files          17       17              
  Lines         843      828      -15     
==========================================
- Hits          565      564       -1     
+ Misses        278      264      -14     
Impacted Files Coverage Δ
napari_animation/_qt/animation_widget.py 27.67% <0.00%> (+1.23%) :arrow_up:
napari_animation/_qt/keyframeslist_widget.py 30.00% <25.00%> (+1.87%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b946428...1e4f3fe. Read the comment docs.

alisterburt commented 3 years ago

looks really great, especially the nice clean style sheet, thanks @tlambert03 !