Bold highlight subsidiary nonmanual tabs when needed #471
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR applies QTabWidget label bolding logic to nested tabs when their parents are selected.
decide_bold_label()is a method inBoldableTabWidgetwhich checks the children of each tab and determines whether its label should be shown in bold. Currently, it is called when initializing the nonman GUI or when the user selects a tab index.Tabs like 'Facial Expression' and 'Mouth' contain an embedded tab, which may need to be bolded. However, since
decide_bold_label()does not look for a QTabWidget among the content, bolding cannot be aplied to a nested tab recursively.This PR connects the index change signal to a new method
on_tab_change(), instead ofdecide_bold_label(). The new method wrapsdecide_bold_label()and applies the bolding logic to the matrix and nested tabs.As well, this PR adds
__repr__()for the TabWidget class for convenience.