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

    Center q-toolbar-title on beta v0.14.0

    Help
    3
    6
    2608
    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.
    • C
      coxy121 last edited by

      On the beta v0.14.0 version of the framework is there is similar function to using :padding=“1” to center the q-toolbar-title if there is only 1 button on 1 side of the menu?

      Currently the title is displayed off center.

      The code I am using is:

      <q-toolbar slot="header">
           <q-btn flat @click="goBack()">
               <q-icon name="arrow_back" />
           </q-btn>
           <q-toolbar-title>
               {{ this.$route.name }}
           </q-toolbar-title>
       </q-toolbar>
      
      1 Reply Last reply Reply Quote 0
      • benoitranque
        benoitranque last edited by

        Have you tried

        <q-toolbar slot="header">
             <q-btn flat @click="goBack()">
                 <q-icon name="arrow_back" />
             </q-btn>
             <q-toolbar-title class="text-center">
                 {{ this.$route.name }}
             </q-toolbar-title>
         </q-toolbar>
        
        1 Reply Last reply Reply Quote 0
        • C
          coxy121 last edited by coxy121

          @benoitranque yes, tried that, unfortunately it just centers the text to that element and doesn’t take in to consideration the space take from the button on the left, so the text is off center, see below.

          0_1501777862280_upload-ec9387fd-f700-4f81-bbfe-51f2bd3342ef

          On the previous version you could use :padding=“1” to resolve this on IOS, but I cannot find anything similar int he beta documentation currently.

          1 Reply Last reply Reply Quote 0
          • C
            coxy121 last edited by

            @rstoenescu is this possible to do anyway in v0.14 beta

            1 Reply Last reply Reply Quote 0
            • rstoenescu
              rstoenescu Admin last edited by

              Put an invisible button after QToolbarTitle.

              1 Reply Last reply Reply Quote 1
              • C
                coxy121 last edited by

                Perfect thanks!

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