Skip to content

Set TAStudio column sizes based on font size#4786

Open
SuuperW wants to merge 4 commits into
TASEmulators:masterfrom
SuuperW:font-resize
Open

Set TAStudio column sizes based on font size#4786
SuuperW wants to merge 4 commits into
TASEmulators:masterfrom
SuuperW:font-resize

Conversation

@SuuperW

@SuuperW SuuperW commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Fixes #3048 and other causes of column sizes being messed up.

All button columns with a single-character mnemonic use the same size, since that preserves the uniform look of the input roll for most buttons. Bigger columns are sized based on a measurement of text length (column text and max analog value length), including button columns.

I considered using JsonIgnore on RollColumn.VerticalWidth and HorizontalHeight since we now resize on loading a movie, but decided against that due to Lua columns. Lua columns can be resized now by re-running tastudio.addcolum though. (column text can also be updated too now because why not)

The cursor icon looks weird with large fonts. I don't know if it should just be centered, or if it should be scaled up to match the font size.

Warning: Running this branch will mess up your config file, so make a backup. All non-TAStudio InputRoll controls will be unusable on the master branch with the updated config file. (The Width property of RollColumn objects will be missing, resulting in it being 0 after deserialization when you go back to the master branch.)

Check if completed:

SuuperW added 3 commits June 27, 2026 23:46
fixes TAStudio columns being the wrong size if loaded with a different Windows display scale factor than the project was created with
fixes cursor column when rotating after loading an old movie
allow `tastudio.addcolumn` to update column width (they might be 0 now, after loading an old movie); also text because why not
@vadosnaprimer

vadosnaprimer commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Bigger columns are sized based on a measurement of text length (column text and max analog value length)

Min value may be bigger due to negative sign, or if some insane arcade machine has negative range that's outright bigger than positive.

The cursor icon looks weird with large fonts. I don't know if it should just be centered, or if it should be scaled up to match the font size.

Scaling sounds better, but I'd need screenshots to know for sure.

@SuuperW

SuuperW commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the minus sign thing. Idk why is was ever excluded, but this use of MaxDigits is the only use so it should be fine to change it to MaxCharacters.

Current frame cursor with font size 20:
image
Vertically centered:
image
Larger triangle manually drawn to the same scale factor as cell height:
image

Depending on how the triangle is drawn the big version might look slightly different. The space to the left of the triangle probably shouldn't be scaled as much.

EDIT: Actually the space to the left of the arrow can be used by branch number text.
image
image
So, width on this column should increase with font size.

It already looks bad when an arrow overlaps a 2-digit branch number, with the default font. I wonder if something should be done about that.

If I stand on the other side of the room, I can barely tell there's anything in the cursor column in the first two pictures but the text is still clear. So making the arrow bigger is probably good.

@vadosnaprimer

Copy link
Copy Markdown
Contributor

Yeah scaling the arrow and the column is the way to go (also those icons for states/markers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TAStudio column width doesn't change when changing font size

2 participants