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

Windows: Background Color Not Applied to child Box #988

Closed
3 of 15 tasks
Vipul-Cariappa opened this issue Jul 27, 2020 · 3 comments
Closed
3 of 15 tasks

Windows: Background Color Not Applied to child Box #988

Vipul-Cariappa opened this issue Jul 27, 2020 · 3 comments
Labels
bug A crash or error in behavior. windows The issue relates to Microsoft Windows support.

Comments

@Vipul-Cariappa
Copy link
Contributor

Vipul-Cariappa commented Jul 27, 2020

Expected Behavior

Background color should change, to the respective color set in Box widget.

Current Behavior

Background color does not change.

Steps to reproduce

from toga import App, MainWindow, Label, Box
from toga.constants import BLUE, COLUMN
from toga.style import Pack


class Application(App):
    def startup(self):

        self.main_window = MainWindow(title=self.name)

        self.frame = Box(
            children=[
                Label("Some Text ...")
                ],
            style=Pack(
                direction=COLUMN,
                background_color=BLUE
            )
        )

        self.main_window.content = Box(children=[self.frame])

        self.main_window.content.refresh()
        self.main_window.show()


if __name__ == "__main__":
    app = Application("BugApp", "App")
    app.main_loop()

Your Environment

  • Python Version 3.7

  • Operating System and Version

    • Other - name: - version:
    • macOS - version:
    • Linux - distro: - version:
    • Windows - Windows 10:
  • Toga Version

    • 0.3.0.dev23
  • Toga Target

    • android
    • cocoa
    • django
    • gtk
    • iOS
    • tvOS
    • watchOS
    • winforms
    • win32
    • Other (please specify)
@Vipul-Cariappa
Copy link
Contributor Author

If we replace

self.main_window.content = Box(children=[self.frame])

with this

self.main_window.content = self.frame

it works fine.

@Vipul-Cariappa Vipul-Cariappa mentioned this issue Jul 30, 2020
4 tasks
@freakboy3742 freakboy3742 added bug A crash or error in behavior. up-for-grabs windows The issue relates to Microsoft Windows support. labels Mar 29, 2022
@mhsmith mhsmith changed the title Box Widget; Background Color Not Applied Windows: Background Color Not Applied to child Box Nov 14, 2022
@mhsmith
Copy link
Member

mhsmith commented Nov 14, 2022

Confirmed that this is still an issue on Windows with the current version of Toga. See #1684 (comment) for a more complete test case.

@freakboy3742
Copy link
Member

Closing as a duplicate of #767

@freakboy3742 freakboy3742 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior. windows The issue relates to Microsoft Windows support.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants