Replies: 1 comment
-
Thanks! 🙂
I guess the problem is that most inputs come with
I don't understand what you mean with "screen width". Isn't the browser dictating the screen width and the (hopefully) responsive page content adapts?
I don't think there's a simple answer. Your approach looks promising though. But
I don't quite understand. The QTable documentation describes each slot with its props that can be accessed when defining a template. In my understanding the expression
You could introduce a custom CSS class ui.add_css('''
.my-white-button {
background-color: #888;
color: white;
}
''') and use it for the button by adding
I totally understand. One of NiceGUI's most important strengths is that it makes underlying frameworks accessible, which opens a world of customizability to the Python developer. This can be challenging, and we're continuously trying to improve the documentation to help beginners as well as advanced developers to learn all these concepts. Thank you for your feedback! I'll keep thinking about how to incorporate it into the documentation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
Hi,
Firstly - thanks for creating such a great tool!
I've been quite confused by a few things around tables, and making use of styling and user customization.
I have the following simplified 'sanitized' example:
Notice how the bottom of the text for "Protocol_3" is not in-line with all other text on the row? I get the impression this is a bug?
I see the other text in the row has
div class="q-field__bottom row items-start q-field__bottom--animated"
, but q-select doesn't.q-checkbox
andq-btn
Refer to the first and last column.
I'm using Nicegui on a raspberry Pi with a 5 inch touchscreen. This has a resolution of 800 x 480.
How would I add a custom width to nicegui/quasar/tailwind?
I see quasar has the following:
https://quasar.dev/options/screen-plugin
As well as tailwind with:
https://tailwindcss.com/docs/screens
If I am to make use of my 800x480 screen at that specific resolution, what exactly should I be doing? Do I need to make a reference for both quasar and tailwind separately? I'm also not too sure how to do this regardless.
This then leads into the next question.
For the 5" touch screen, certain columns in the example (Name, and TIN) are very 'narrow" by default.
I've tried to 'workaround' this by doing:
Which works on the small screen size, but things look 'odd' when viewing nicegui on a normal screen.
I've tried some of the options on https://tailwindcss.com/docs/responsive-design but not really having much luck in getting this right.
For example, I tried
{'name': 'thingName', <output omitted>, 'headerClasses': 'md:w-48 w-flex'}
or ``{'name': 'thingName', , 'headerClasses': 'md:max-md:w-48 w-flex'} however this seems to just obey one rule, and not both conditions?<q-td key="tin" :props="props">
My understanding of the above is that we will inherit the previously defined props for the table.
What if we want to do this, but also add to the props for this specific section?
Consider the following near the bottom of the example:
style="background-color: #888; color:white;"
Is there a way I could have done this better? perhaps convert background color into a variable, or a shared value referenced from elsewhere? I couldn't find an example of how this might be achieved.
Thanks again for the help!
As a mostly backend dev, I really appreciate NiceGUI, but I have found it quite a learning curve trying to understand where to use things like props, classes, or style etc. I get the basics of html and javascript, but it has been confusing knowing how to read in-between-the-lines between the nicegui docs, versus quasar or tailwind.
It would be really useful having a guide or example of how to use the quasar docs when doing customization with nicegui. My main issue is often not knowing the syntax, or how to do multiple things in a row. Ultimately more examples in the nicegui docs is extremely useful.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions