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

Tab width #628

Merged
merged 2 commits into from
May 6, 2024
Merged

Tab width #628

merged 2 commits into from
May 6, 2024

Conversation

lievenhey
Copy link
Contributor

No description provided.

@lievenhey lievenhey requested a review from milianw May 2, 2024 14:20
@lievenhey lievenhey force-pushed the tab-width branch 2 times, most recently from aa6de85 to af038e8 Compare May 2, 2024 14:35
tests/modeltests/tst_formatting.cpp Show resolved Hide resolved
src/models/highlightedtext.h Outdated Show resolved Hide resolved
src/models/highlightedtext.cpp Outdated Show resolved Hide resolved
src/models/sourcecodemodel.h Outdated Show resolved Hide resolved
src/resultsdisassemblypage.cpp Outdated Show resolved Hide resolved
src/disassemblysettingspage.ui Show resolved Hide resolved
@lievenhey lievenhey force-pushed the tab-width branch 2 times, most recently from 6c1a8c4 to 23ca904 Compare May 3, 2024 09:21
@lievenhey lievenhey requested a review from milianw May 3, 2024 09:21
@lievenhey lievenhey force-pushed the tab-width branch 2 times, most recently from 39b3c97 to f67a264 Compare May 3, 2024 09:25
void setTabWidthInPixels(int tabWidthInPixels)
{
m_tabWidthInPixels = tabWidthInPixels;
m_layout = nullptr;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.reset() is more expressive

tests/modeltests/tst_formatting.cpp Show resolved Hide resolved
lievenhey added 2 commits May 6, 2024 14:32
This patch allows the user to set a custom width for \t. Since we use a
monospace font we can simply use a multiple of the character width. This
is done by settings the tabstopdistance of the QTextOption property of
QTextLayout.

closes: #583
@lievenhey lievenhey merged commit 0cdebbb into master May 6, 2024
25 checks passed
@lievenhey lievenhey deleted the tab-width branch May 6, 2024 13:16
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.

2 participants