Git Product home page Git Product logo

Comments (6)

kisvegabor avatar kisvegabor commented on May 16, 2024 1

I'm happy that it's working! :)

I will figure out something for scrollbar.

from lvgl.

kisvegabor avatar kisvegabor commented on May 16, 2024

It really doesn't work properly. I will fix it on Monday. Until that please try this: lv_obj_set_style(lv_page_get_scrl(ta), &style) it will set the style of the transparent scrollable part of text area. Use LV_STYLE_TRANSP_TIGHT as starting point.

vpad and hpad now do not affect the scrollbar position but it is a good idea to do that!

from lvgl.

kisvegabor avatar kisvegabor commented on May 16, 2024

Now the label's position should be affected by hpad and vpad.
Can you test it?

How do you imagine the scrollbar and hpad/vpad relationship?

from lvgl.

BenQoo avatar BenQoo commented on May 16, 2024

Now the label's position should be affected by hpad and vpad.
Can you test it?

No problem.
After testing, It works now, thank you!

How do you imagine the scrollbar and hpad/vpad relationship?

Sorry, I'm not familiar with them. I guess it can change hpad/vpad to adjust the position of scrollbar.

from lvgl.

kisvegabor avatar kisvegabor commented on May 16, 2024

In beta scrollbar positions are affected by style.body.padding.hor and style.body.padding.hor.
(Please update you misc_conf.h and lv_conf.h from misc_conf_templ.h and lv_conf_templ.h)

Like this:

    static lv_style_t sb_style;
    lv_style_copy(&sb_style, &lv_style_plain_color);
    sb_style.body.padding.hor = -15;
    sb_style.body.padding.ver = 15;

    lv_obj_t *page = lv_page_create(lv_scr_act(), NULL);
    lv_page_set_style(page, LV_PAGE_STYLE_SB, &sb_style);
    lv_page_set_sb_mode(page, LV_SB_MODE_ON);
    lv_page_set_scrl_fit(page, true, true);
    lv_obj_set_size_scale(page, 100, 200);
    lv_obj_set_pos_scale(page, 10, 10);

    lv_obj_t *label = lv_label_create(page, NULL);
    lv_label_set_text(label, "long long lines\n\n"
                             "to shows the\n\n"
                             "scrollbars'\n\n"
                             "position.\n\n"
                             "Some dummy text\n\n"
                             "Some dummy text\n\n"
                             "Some dummy text\n\n");

screenshot from 2017-11-20 14-14-17

from lvgl.

kisvegabor avatar kisvegabor commented on May 16, 2024

Added in v5.0.0

from lvgl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.