kxgames / glooey

An object-oriented GUI library for pyglet.
MIT License
91 stars 6 forks source link

FancyFillBar from golden theme doesn't behave properly #53

Closed UplinkPhobia closed 2 years ago

UplinkPhobia commented 2 years ago

Hey,

I wanted to test some things with themes and tried using a golden.FancyFillBar, but the contents of the fill bar aren't on the right place.

This simple code

import pyglet
import glooey.themes.golden as golden

window = pyglet.window.Window()
gui = golden.Gui(window)
bar = golden.FancyFillBar()
# bar.alignment = 'center'
gui.add(bar)

bar.fraction_filled = .5

pyglet.app.run()

creates the following: Capture d’écran du 2021-09-18 02-17-46

It seems it passed the tests because the bar is at the right place when its alignment is "center".

kalekundert commented 2 years ago

Thanks for finding this. The problem was that the Base and the Fill had different default alignments, and it should be fixed now.