Mon, 13 Apr 2020 16:57:44 +0200
Editor, Shell: added configuration option for the calltips foreground and highlight color.
--- a/eric6/Preferences/ConfigurationPages/EditorCalltipsPage.py Mon Apr 13 16:26:46 2020 +0200 +++ b/eric6/Preferences/ConfigurationPages/EditorCalltipsPage.py Mon Apr 13 16:57:44 2020 +0200 @@ -41,8 +41,13 @@ self.ctVisibleSlider.setValue( Preferences.getEditor("CallTipsVisible")) + self.initColour("CallTipsBackground", self.calltipsBackgroundButton, Preferences.getEditorColour) + self.initColour("CallTipsForeground", self.calltipsForegroundButton, + Preferences.getEditorColour) + self.initColour("CallTipsHighlight", self.calltipsHighlightButton, + Preferences.getEditorColour) self.ctScintillaCheckBox.setChecked( Preferences.getEditor("CallTipsScintillaOnFail")) @@ -62,6 +67,7 @@ Preferences.setEditor( "CallTipsVisible", self.ctVisibleSlider.value()) + self.saveColours(Preferences.setEditorColour) Preferences.setEditor(
--- a/eric6/Preferences/ConfigurationPages/EditorCalltipsPage.ui Mon Apr 13 16:26:46 2020 +0200 +++ b/eric6/Preferences/ConfigurationPages/EditorCalltipsPage.ui Mon Apr 13 16:57:44 2020 +0200 @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>408</width> - <height>373</height> + <height>556</height> </rect> </property> <layout class="QVBoxLayout" name="verticalLayout_3"> @@ -119,17 +119,17 @@ <item> <widget class="QGroupBox" name="groupBox_2"> <property name="title"> - <string>Colours</string> + <string>Colors</string> </property> - <layout class="QHBoxLayout"> - <item> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> <widget class="QLabel" name="TextLabel2_2_2_2"> <property name="text"> - <string>Background colour:</string> + <string>Background color:</string> </property> </widget> </item> - <item> + <item row="0" column="1"> <widget class="QPushButton" name="calltipsBackgroundButton"> <property name="minimumSize"> <size> @@ -138,14 +138,14 @@ </size> </property> <property name="toolTip"> - <string>Select the background colour for calltips.</string> + <string>Select the background color for calltips.</string> </property> <property name="text"> <string/> </property> </widget> </item> - <item> + <item row="0" column="2"> <spacer> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -158,6 +158,52 @@ </property> </spacer> </item> + <item row="1" column="0"> + <widget class="QLabel" name="TextLabel2_2_2_3"> + <property name="text"> + <string>Foreground color:</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QPushButton" name="calltipsForegroundButton"> + <property name="minimumSize"> + <size> + <width>100</width> + <height>0</height> + </size> + </property> + <property name="toolTip"> + <string>Select the foreground color for calltips.</string> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="TextLabel2_2_2_4"> + <property name="text"> + <string>Highlight color:</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QPushButton" name="calltipsHighlightButton"> + <property name="minimumSize"> + <size> + <width>100</width> + <height>0</height> + </size> + </property> + <property name="toolTip"> + <string>Select the highlight color for calltips.</string> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> </layout> </widget> </item> @@ -200,7 +246,11 @@ </widget> <tabstops> <tabstop>ctEnabledCheckBox</tabstop> + <tabstop>ctVisibleSlider</tabstop> + <tabstop>positionComboBox</tabstop> <tabstop>calltipsBackgroundButton</tabstop> + <tabstop>calltipsForegroundButton</tabstop> + <tabstop>calltipsHighlightButton</tabstop> <tabstop>ctScintillaCheckBox</tabstop> </tabstops> <resources/>
--- a/eric6/Preferences/__init__.py Mon Apr 13 16:26:46 2020 +0200 +++ b/eric6/Preferences/__init__.py Mon Apr 13 16:57:44 2020 +0200 @@ -642,6 +642,8 @@ "NonmatchingBrace": QColor(Qt.red), "NonmatchingBraceBack": QColor(Qt.white), "CallTipsBackground": QColor(Qt.white), + "CallTipsForeground": QColor("#7f7f7f"), + "CallTipsHighlight": QColor("#00007f"), "CaretForeground": QColor(Qt.black), "CaretLineBackground": QColor(Qt.white), "Edge": QColor(Qt.lightGray),
--- a/eric6/QScintilla/Editor.py Mon Apr 13 16:26:46 2020 +0200 +++ b/eric6/QScintilla/Editor.py Mon Apr 13 16:57:44 2020 +0200 @@ -4720,6 +4720,10 @@ """ self.setCallTipsBackgroundColor( Preferences.getEditorColour("CallTipsBackground")) + self.setCallTipsForegroundColor( + Preferences.getEditorColour("CallTipsForeground")) + self.setCallTipsHighlightColor( + Preferences.getEditorColour("CallTipsHighlight")) self.setCallTipsVisible(Preferences.getEditor("CallTipsVisible")) calltipsStyle = Preferences.getEditor("CallTipsStyle") try:
--- a/eric6/QScintilla/Shell.py Mon Apr 13 16:26:46 2020 +0200 +++ b/eric6/QScintilla/Shell.py Mon Apr 13 16:57:44 2020 +0200 @@ -581,6 +581,10 @@ if Preferences.getShell("CallTipsEnabled"): self.setCallTipsBackgroundColor( Preferences.getEditorColour("CallTipsBackground")) + self.setCallTipsForegroundColor( + Preferences.getEditorColour("CallTipsForeground")) + self.setCallTipsHighlightColor( + Preferences.getEditorColour("CallTipsHighlight")) self.setCallTipsVisible(Preferences.getEditor("CallTipsVisible")) calltipsStyle = Preferences.getEditor("CallTipsStyle") if calltipsStyle == QsciScintilla.CallTipsNoContext: