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

Fix some minor color/style config issues in the qtconsole #1363

Merged
merged 4 commits into from Feb 8, 2012

Conversation

minrk
Copy link
Member

@minrk minrk commented Feb 1, 2012

The tabbed code changed a few things about loading styles and stylesheets in the qtconsole, which this resolves, among a couple other small color-related issues:

  • tabs other than the first get colors
  • IPythonWidget.style_sheet configurable is not clobbered by defaults
  • style_sheet configurable would cause a crash, because _style_sheet_changed could be called before _control existed
  • fix str->unicode token preventing stylesheets without syntax highlighting from working
  • fix typo in the function used to detect whether a bgcolor is dark or light

previously used 'r' for all 3 values
otherwise a TypeError is raised in str.translate, since
unicode.translate takes a dict, while str.translate takes a bytestring
… exists

also ensure _control attributes start out as None, rather than undefined
* setting IPythonWidget.style_sheet is no longer clobbered by other
config or defaults.
* tabs other than the first get configured colors
@ellisonbg
Copy link
Member

I don't have Qt installed on this system, but the code looks good.

minrk added a commit that referenced this pull request Feb 8, 2012
Fix some minor color/style config issues in the qtconsole

The tabbed code changed a few things about loading styles and stylesheets in the qtconsole, which this resolves, among a couple other small color-related issues:

* tabs other than the first get colors
* IPythonWidget.style_sheet configurable is not clobbered by defaults
* style_sheet configurable would cause a crash, because _style_sheet_changed could be called before _control existed
* fix str->unicode token preventing stylesheets without syntax highlighting from working
* fix typo in the function used to detect whether a bgcolor is dark or light
@minrk minrk merged commit 2b3bc44 into ipython:master Feb 8, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Fix some minor color/style config issues in the qtconsole

The tabbed code changed a few things about loading styles and stylesheets in the qtconsole, which this resolves, among a couple other small color-related issues:

* tabs other than the first get colors
* IPythonWidget.style_sheet configurable is not clobbered by defaults
* style_sheet configurable would cause a crash, because _style_sheet_changed could be called before _control existed
* fix str->unicode token preventing stylesheets without syntax highlighting from working
* fix typo in the function used to detect whether a bgcolor is dark or light
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.

None yet

2 participants