FelixBaensch / MORTAR

MOlecule fRagmenTAtion fRamework
MIT License
18 stars 3 forks source link

Unnecessary vertical scroll bar in items tab #100

Closed JonasSchaub closed 2 months ago

JonasSchaub commented 2 months ago

image

A related problem is that after fragmentation, the gap at the bottom of the molecules tab becomes larger.

Before fragmentation:

image

After fragmentation:

image

As I understand it, the image structure heights of the imported molecule data models are updated when the fragments and items tabs are created. For the items tab, they have to be smaller than before to accommodate the horizontal scroll bar at the bottom and the doubled table header height (fragments column is split into multiple sub-columns). The problem is: this reflects back to image structure heights in the molecules tab, increasing the gap at the bottom.

I see two possible solutions: 1) (quick and dirty) remove the overall fragments column in the items tab (but keep separate "Fragment 1", "Fragment 2", etc columns) and then tweak the image structure height adjustment in a way that doe snot make things much worse in the molecules tab but makes the vertical scroll bar in the items tab disappear. 2) (touching the data models and more complex) separate the image structure height property of the molecule data models into separate properties, i.e. image structure height for molecules tab, fragments tab, items tab, etc.

To discuss and probably not fix for v1.2.

FelixBaensch commented 2 months ago

Are you sure, I don't think the structures once drawn are updated just because a new tab is added. I would rather try to customize the "setImageStructureHeight" method in "GuiUtil". The easiest way would be to add another minuend in line 539 by trial and error.

FelixBaensch commented 2 months ago

A related problem is that after fragmentation, the gap at the bottom of the molecules tab becomes larger.

I can't reproduce this on Linux.

JonasSchaub commented 2 months ago

Are you sure, I don't think the structures once drawn are updated just because a new tab is added.

I can't reproduce this on Linux.

Did you switch pages after the fragmentation was completed? Drawn structures or rather generated and displayed pages are not updated but they will be updated when you switch pages and a new page is created.

JonasSchaub commented 2 months ago

I would rather try to customize the "setImageStructureHeight" method in "GuiUtil". The easiest way would be to add another minuend in line 539 by trial and error.

I tried that but then, the gap at the bottom of the molecules tab becomes even larger.

FelixBaensch commented 2 months ago

Let us meet about this

JonasSchaub commented 2 months ago

Gladly, can you suggest a time slot?

FelixBaensch commented 2 months ago

Friday morning before 11 am

JonasSchaub commented 2 months ago

Friday morning before 11 am

Friday at 10 am would suit me, since I'm meeting the students at 9.

JonasSchaub commented 2 months ago

Just as a related note: there is another "unnecessary" scroll bar at the bottom of the histogram view.