beeware / beeware/toga

Pack style engine width not correct size on linux?

Open
#3,780 4 comments 0 reactions 0 assignees View on GitHub
bug gtk linux
Dominant language
Python
Stars
5.4k
Forks
827
Avg merge
15h 39m
Merged PRs (30d)
40

Description

### Describe the bug

On linux, when I set the width of labels using the Pack style engine, the width isn't correct. Here is a screenshot:

Image

### Steps to reproduce

1. Create a toga label and use the pack style engine to set the width to 2 (I only tested it with a width of 2)
2. Run the toga app on linux

### Expected behavior

The expected behavior is the toga label should be cut off because the width is too short for the text, but its not

### Screenshots

_No response_

### Environment

- Operating System: Ubuntu 25.04
- Python version: 3.13.3
- Software versions:
- Briefcase: 0.3.25
- Toga: 0.5.2

### Logs

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue on Ubuntu with a Toga label using the pack style engine and width 2, then trace the label sizing path. Compare the rendered width with the expected clipped text behavior; done means the label is cut off when its configured width is too small.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.