Bug 416372 - tab minimum width and height should be user-definable - with workaround - for better usability on touchscreens
Summary: tab minimum width and height should be user-definable - with workaround - for...
Status: REPORTED
Alias: None
Product: Falkon
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
: 450291 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-01-17 09:22 UTC by Raphael Rosch
Modified: 2022-03-07 05:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raphael Rosch 2020-01-17 09:22:52 UTC
SUMMARY
The user should be able to determine the minimum width each tab can have, instead of it being hardcoded.

STEPS TO REPRODUCE
1. Open many tabs (10+ at least)
2. Resize the width of the window, reducing until the scroll buttons on the tab bar appears
3. You now are forced to scroll to get at tabs on each end

OBSERVED RESULT

No configuration option in preferences to define tab minimum width, so tabs are too wide to fit in tabbar, requiring the scrollbar to appear, requiring scrolling to get to tabs, not very pleasant when one has many tabs open in a given window where just the page favicon would be sufficient to see.

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Falkon git master as of 2020 Jan 1
Linux Fedora Core 30 - 32bit
QtWebEngine version 5.12.5
Frameworks 5.64


ADDITIONAL INFORMATION

In src/lib/tabwidget/tabbar.cpp we can find the values (line 58):

        m_metrics[0] = 250;
        m_metrics[1] = 100;
        m_metrics[2] = 100;
        m_metrics[3] = 100;
        m_metrics[4] = -1; // Will be initialized from TabBar

defined as:

private:
    QHash<int, int> m_metrics;

and accessed with:

    int normalMaxWidth() const { return m_metrics.value(0); }
    void setNormalMaxWidth(int value) { m_metrics[0] = value; }

    int normalMinWidth() const { return m_metrics.value(1); }
    void setNormalMinWidth(int value) { m_metrics[1] = value; }

    int activeMinWidth() const { return m_metrics.value(2); }
    void setActiveMinWidth(int value) { m_metrics[2] = value; }

    int overflowedWidth() const { return m_metrics.value(3); }
    void setOverflowedWidth(int value) { m_metrics[3] = value; }

    int pinnedWidth() const { return m_metrics.value(4); }
    void setPinnedWidth(int value) { m_metrics[4] = value; }


In my opinion, using a hash is overkill, and introduces hash lookup delays when having internal variables would do the trick perfectly, plus would massively improve code readibility. Something like:

        m_normalMaxWidth
        m_normalMinWidth
        m_activeMinWidth
        m_overflowedWidth
        m_pinnedWidth

(I just started on kde/Qt/KF5 development, but isn't that what the Q_PROPERTY's defined above (line 47) are supposed to do? I have not personally tested that.)

On my own tree I have just changed the hardcoded values (min normal 20, min active 28), but it would be great if someone with the workflow for new preferences entries could add some int entries for these. I'm guessing the best place would be a new (third) tab on the "Tabs" preferences, and it would make sense to have a spinner and minimum and maximum allowable entries, and probably a trigger to not allow a higher min than max values. I unfortunately won't have time to write the entries (I gave it a look to see how long it would take me, and right now it's more than I can devote to this than I already have). Some of the relevant files are:

src/lib/preferences/preferences.{h,cpp,ui}

and 

void TabBar::loadSettings()

in src/lib/tabwidget/tabbar.cpp (line 127)

not sure what else would be helpful to mention. Thank you to the brave soul who will undertake this task.
Comment 1 genghiskhan 2022-03-07 05:18:20 UTC
I'm interested in that feature too.
This is exactly what I do with FF.

Because tabbar is scroll-able , it's more productive for user to have wide to set wider width to tabs in order to detect desired pages by title.
See video file of report #451222 https://bugs.kde.org/attachment.cgi?id=147339
Comment 2 genghiskhan 2022-03-07 05:22:18 UTC
*** Bug 450291 has been marked as a duplicate of this bug. ***
Comment 3 genghiskhan 2022-03-07 05:25:24 UTC
I've marked Bug #450291 as a duplicate.  Content of Bug #450291 below:

This might be related to bug #445419
I'm using Falkon with a touchpad, because Falkon (or its backend) is the ONLY web web software that is fully usable with touchscreens.
However, the GUI/Qt interface itself doesn't seem to be optimized for touchscreens.
I request in this report to add a touch mode display, similarly to Firefox and Plasma, which really requires padding GUI objects, **particularly tabs**.