No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    0.14 QTab sizing

    Help
    4
    9
    3376
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kayex last edited by

      What’s the proper/best way to make QTabs more compact? They take up quite a bit of screen real-estate when combined with the toolbar.

      Unless I missed it, it would be nice if this was a component parameter.

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        The best solution is the have the toolbar and tabs hide when scrolling, which is a standard feature of the layout. Something else you can do is adjust the tab min height in the stylus variables. http://beta.quasar-framework.org/components/stylus-variables.html

        Learn more about theming here: http://beta.quasar-framework.org/guide/quasar-theming.html

        Learn more about the layout features: http://beta.quasar-framework.org/components/layout.html (especially the “reveal” prop)

        Scott

        1 Reply Last reply Reply Quote 0
        • a47ae
          a47ae last edited by

          You can just set the width of the parent element and the tabs will change accordingly.

          1 Reply Last reply Reply Quote 0
          • s.molinari
            s.molinari last edited by

            I’d say his issue is with the height, not the width.

            Scott

            1 Reply Last reply Reply Quote 0
            • a47ae
              a47ae last edited by

              Oh, if it is about the height, then forget what I said. 😃

              1 Reply Last reply Reply Quote 0
              • K
                kayex last edited by

                It is the height I’d like to trim some fat off of, yes. 🙂

                Thanks for the feedback Scott. I am using the reveal prop and it works great. I’ll try to mess around with the stylus pieces you recommended as it still feels too chunky , especially in desktop view. It would be nice if it behaved similar to QBtn, having a “small” prop available to optionally trim it down as well.

                1 Reply Last reply Reply Quote 1
                • s.molinari
                  s.molinari last edited by s.molinari

                  One other thing I think I asked Razvan for was a way to put icons next to the text in the tabs, instead of on top, as the icons over the text makes the tab bar a lot more “chunky” as you put it. Since the tabs have scrolling, the width isn’t such an issue and I think it looks better on the desktop. The icons on top of the text is Material design spec conform and I can’t remember what Razvan replied. Oh well. See what you can do. I’m sure you’ll get tabs where you need them.

                  Scott

                  1 Reply Last reply Reply Quote 1
                  • K
                    kayex last edited by

                    Yes sir. I ended up sizing the tab icons to same font-size as a small qbtn and removed the labels. I’m using tooltips to replace the labels. It should be fine what I’m trying to do for now. Thanks for responding.

                    1 Reply Last reply Reply Quote 0
                    • L
                      leob last edited by leob

                      I agree with @kayex that the tabs look fairly bulky (especially the height), even more so if the app’s toolbar also is that big. The end result is that it all looks just a bit too clunky and not really elegant.

                      To deal with this, I ended up making the font size and icon font size smaller, as well as the padding and min height. All of this through variables in app.variables.styl:

                      $tabs-font-size ?= .8rem
                      $tabs-icon-font-size ?= 23px
                      $tabs-padding-with-icon ?= 8px 10px
                      $tabs-min-height-with-icon ?= 48px

                      Same exercise for the app’s toolbar, in that case making the toolbar less “high” was simply a matter of specifying “small” on the buttons:

                      <q-toolbar glossy slot=“header”>
                      …
                      <q-btn flat small round …
                      …

                      This results in a UI that looks just a little more subtle and less clunky.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post