最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

kivy - How to resize hint_text in KivyMD? - Stack Overflow

programmeradmin2浏览0评论

I want a dynamic screen where widgets are resizable dependent on screen size (small screen, widgets are smaller). This works for most of my widgets with the exception of the MDTextField. I have a hint_text, where the font size does not scale with the screen. I tried using font_size dependent on window.width, but it doesn't seem to work properly.

Could someone help me please? Thanks:)

Here is a snippet of my current code:

BoxLayout:
   orientation: 'horizontal'

   spacing: "10dp"

   padding: "30dp"

   MDTextField:

      id: location_input

      hint_text: "Enter Location"

      font_size: (Window.width * 0.02) + 8

      pos_hint: {"x": 0.02, "bottom": 0.3}
发布评论

评论列表(0)

  1. 暂无评论