Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gleam Tabs #7

Merged
merged 2 commits into from Oct 19, 2023
Merged

Gleam Tabs #7

merged 2 commits into from Oct 19, 2023

Conversation

vitosotdihaet
Copy link
Contributor

Original Gleam widget scheme didn't work properly with Tabs.

There were different unwanted behaviors with different TabsOverflow handlers:

  • Compress: text from compressed tabs was rendering over other tabs. Also half of the frame border was rendering over other tabs.
  • Pulldown: text from any tab was rendering over pulldown button.

The fix was to change shade_rect_up() function from instantly breaking loop:

...
let mut k = 1.0;
    loop {
        if k >= 0.90 {
            break;
        }
...

to just filling the rectangle (I believe it's meant to draw some kind of gradient, but I didn't understand it, sorry):

fn shade_rect_up(x: i32, y: i32, w: i32, h: i32, bc: Color) {
    set_draw_color(activated_color(bc));
    draw_rectf(x, y, w, h);
}

The tabs example is added, showing this problem was present and is now fixed.

@MoAlyousef
Copy link
Contributor

Thank you. I see the strange artifact. I'll publish a new version soon.

@MoAlyousef MoAlyousef merged commit de4e086 into fltk-rs:main Oct 19, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants