Wed, 07 Dec 2022 11:35:40 +0100
Rearranged the Conda widget layout (see issue468).
src/eric7/CondaInterface/CondaPackagesWidget.py | file | annotate | diff | comparison | revisions | |
src/eric7/CondaInterface/CondaPackagesWidget.ui | file | annotate | diff | comparison | revisions |
--- a/src/eric7/CondaInterface/CondaPackagesWidget.py Wed Dec 07 10:50:34 2022 +0100 +++ b/src/eric7/CondaInterface/CondaPackagesWidget.py Wed Dec 07 11:35:40 2022 +0100 @@ -58,9 +58,7 @@ self.__conda = conda if not CondaInterface.isCondaAvailable(): - self.baseWidget.hide() - self.searchWidget.hide() - + self.availableWidget.hide() else: self.notAvailableWidget.hide() @@ -85,7 +83,8 @@ self.upgradeButton.setIcon(EricPixmapCache.getIcon("1uparrow")) self.upgradeAllButton.setIcon(EricPixmapCache.getIcon("2uparrow")) self.uninstallButton.setIcon(EricPixmapCache.getIcon("minus")) - self.searchToggleButton.setIcon(EricPixmapCache.getIcon("find")) + self.searchToggleButton_1.setIcon(EricPixmapCache.getIcon("find")) + self.searchToggleButton_2.setIcon(EricPixmapCache.getIcon("find")) self.searchButton.setIcon(EricPixmapCache.getIcon("findNext")) self.installButton.setIcon(EricPixmapCache.getIcon("plus")) self.showDetailsButton.setIcon(EricPixmapCache.getIcon("info")) @@ -525,14 +524,15 @@ self.__showDetails(item) @pyqtSlot(bool) - def on_searchToggleButton_toggled(self, checked): + def on_searchToggleButton_1_toggled(self, checked): """ - Private slot to togle the search widget. + Private slot to toggle the search widget. @param checked state of the search widget button @type bool """ self.searchWidget.setVisible(checked) + self.searchToggleButton_2.setChecked(checked) if checked: self.searchEdit.setFocus(Qt.FocusReason.OtherFocusReason) @@ -540,6 +540,16 @@ self.__updateSearchActionButtons() + @pyqtSlot(bool) + def on_searchToggleButton_2_toggled(self, checked): + """ + Private slot to toggle the search widget. + + @param checked state of the search widget button + @type bool + """ + self.searchToggleButton_1.setChecked(checked) + ####################################################################### ## Menu related methods below #######################################################################
--- a/src/eric7/CondaInterface/CondaPackagesWidget.ui Wed Dec 07 10:50:34 2022 +0100 +++ b/src/eric7/CondaInterface/CondaPackagesWidget.ui Wed Dec 07 11:35:40 2022 +0100 @@ -6,11 +6,11 @@ <rect> <x>0</x> <y>0</y> - <width>600</width> - <height>600</height> + <width>500</width> + <height>800</height> </rect> </property> - <layout class="QVBoxLayout" name="verticalLayout_5"> + <layout class="QVBoxLayout" name="verticalLayout_6"> <item> <widget class="QWidget" name="notAvailableWidget" native="true"> <layout class="QVBoxLayout" name="verticalLayout_4"> @@ -106,8 +106,8 @@ </widget> </item> <item> - <widget class="QWidget" name="baseWidget" native="true"> - <layout class="QVBoxLayout" name="verticalLayout_3"> + <widget class="QWidget" name="availableWidget" native="true"> + <layout class="QVBoxLayout" name="verticalLayout_5"> <property name="leftMargin"> <number>0</number> </property> @@ -131,152 +131,15 @@ </layout> </item> <item> - <widget class="QLabel" name="statusLabel"/> - </item> - <item> - <widget class="QTreeWidget" name="packagesList"> - <property name="alternatingRowColors"> - <bool>true</bool> - </property> - <property name="selectionMode"> - <enum>QAbstractItemView::ExtendedSelection</enum> - </property> - <property name="rootIsDecorated"> - <bool>false</bool> - </property> - <property name="itemsExpandable"> - <bool>false</bool> + <widget class="Line" name="line_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> </property> - <attribute name="headerDefaultSectionSize"> - <number>150</number> - </attribute> - <column> - <property name="text"> - <string>Package</string> - </property> - </column> - <column> - <property name="text"> - <string>Installed Version</string> - </property> - </column> - <column> - <property name="text"> - <string>Available Version</string> - </property> - </column> </widget> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QToolButton" name="refreshButton"> - <property name="toolTip"> - <string>Press to refresh the lists</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="upgradeButton"> - <property name="toolTip"> - <string>Press to upgrade the selected packages</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="upgradeAllButton"> - <property name="toolTip"> - <string>Press to upgrade all listed packages</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="uninstallButton"> - <property name="toolTip"> - <string>Press to uninstall the selected package</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QToolButton" name="searchToggleButton"> - <property name="toolTip"> - <string>Toggle to show or hide the search window</string> - </property> - <property name="checkable"> - <bool>true</bool> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QWidget" name="searchWidget" native="true"> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_4"> - <item> - <widget class="QLineEdit" name="searchEdit"> - <property name="placeholderText"> - <string>Enter search specification</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="searchButton"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="toolTip"> - <string>Press to start the search</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QWidget" name="searchOptionsWidget" native="true"> - <layout class="QVBoxLayout" name="verticalLayout"> + <widget class="QWidget" name="searchWidget" native="true"> + <layout class="QVBoxLayout" name="verticalLayout_2"> <property name="leftMargin"> <number>0</number> </property> @@ -290,140 +153,319 @@ <number>0</number> </property> <item> - <layout class="QHBoxLayout" name="horizontalLayout_5"> + <layout class="QHBoxLayout" name="horizontalLayout_3"> <item> - <widget class="QRadioButton" name="patternButton"> - <property name="toolTip"> - <string>Search string is a pattern (default)</string> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> </property> - <property name="text"> - <string>Search Pattern</string> + </spacer> + </item> + <item> + <widget class="QToolButton" name="installButton"> + <property name="toolTip"> + <string>Press to install the selected package (by name or package specification)</string> </property> - <property name="checked"> - <bool>true</bool> + </widget> + </item> + <item> + <widget class="QToolButton" name="showDetailsButton"> + <property name="toolTip"> + <string>Press to show details for the selected entry</string> </property> </widget> </item> <item> - <widget class="QRadioButton" name="fullNameButton"> + <spacer name="horizontalSpacer_4"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QToolButton" name="searchToggleButton_2"> <property name="toolTip"> - <string>Search string is a full name</string> + <string>Toggle to show or hide the search window</string> + </property> + <property name="checkable"> + <bool>true</bool> </property> - <property name="text"> - <string>Full Name</string> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <widget class="QLineEdit" name="searchEdit"> + <property name="placeholderText"> + <string>Enter search specification</string> </property> </widget> </item> <item> - <widget class="QRadioButton" name="packageSpecButton"> + <widget class="QToolButton" name="searchButton"> + <property name="enabled"> + <bool>false</bool> + </property> <property name="toolTip"> - <string>Search string is a package specification</string> - </property> - <property name="text"> - <string>Package Specification</string> + <string>Press to start the search</string> </property> </widget> </item> </layout> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout_7"> - <item> - <widget class="QLabel" name="label"> - <property name="text"> - <string>Platform:</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="platformComboBox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="toolTip"> - <string>Select the platform</string> - </property> - </widget> - </item> - </layout> + <widget class="QWidget" name="searchOptionsWidget" native="true"> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_5"> + <item> + <widget class="QRadioButton" name="patternButton"> + <property name="toolTip"> + <string>Search string is a pattern (default)</string> + </property> + <property name="text"> + <string>Search Pattern</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="fullNameButton"> + <property name="toolTip"> + <string>Search string is a full name</string> + </property> + <property name="text"> + <string>Full Name</string> + </property> + </widget> + </item> + <item> + <widget class="QRadioButton" name="packageSpecButton"> + <property name="toolTip"> + <string>Search string is a package specification</string> + </property> + <property name="text"> + <string>Package Specification</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_7"> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Platform:</string> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="platformComboBox"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Select the platform</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QTreeWidget" name="searchResultList"> + <property name="alternatingRowColors"> + <bool>true</bool> + </property> + <column> + <property name="text"> + <string>Package</string> + </property> + </column> + <column> + <property name="text"> + <string>Version</string> + </property> + </column> + <column> + <property name="text"> + <string>Build</string> + </property> + </column> + <column> + <property name="text"> + <string>Platform</string> + </property> + </column> + </widget> + </item> + <item> + <widget class="Line" name="line"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> </item> </layout> </widget> </item> <item> - <widget class="QTreeWidget" name="searchResultList"> - <property name="alternatingRowColors"> - <bool>true</bool> - </property> - <column> - <property name="text"> - <string>Package</string> + <widget class="QWidget" name="baseWidget" native="true"> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> </property> - </column> - <column> - <property name="text"> - <string>Version</string> - </property> - </column> - <column> - <property name="text"> - <string>Build</string> - </property> - </column> - <column> - <property name="text"> - <string>Platform</string> - </property> - </column> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QToolButton" name="refreshButton"> + <property name="toolTip"> + <string>Press to refresh the lists</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="upgradeButton"> + <property name="toolTip"> + <string>Press to upgrade the selected packages</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="upgradeAllButton"> + <property name="toolTip"> + <string>Press to upgrade all listed packages</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="uninstallButton"> + <property name="toolTip"> + <string>Press to uninstall the selected package</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QToolButton" name="searchToggleButton_1"> + <property name="toolTip"> + <string>Toggle to show or hide the search window</string> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QLabel" name="statusLabel"/> + </item> + <item> + <widget class="QTreeWidget" name="packagesList"> + <property name="alternatingRowColors"> + <bool>true</bool> + </property> + <property name="selectionMode"> + <enum>QAbstractItemView::ExtendedSelection</enum> + </property> + <property name="rootIsDecorated"> + <bool>false</bool> + </property> + <property name="itemsExpandable"> + <bool>false</bool> + </property> + <attribute name="headerDefaultSectionSize"> + <number>150</number> + </attribute> + <column> + <property name="text"> + <string>Package</string> + </property> + </column> + <column> + <property name="text"> + <string>Installed Version</string> + </property> + </column> + <column> + <property name="text"> + <string>Available Version</string> + </property> + </column> + </widget> + </item> + </layout> </widget> </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_3"> - <item> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QToolButton" name="installButton"> - <property name="toolTip"> - <string>Press to install the selected package (by name or package specification)</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="showDetailsButton"> - <property name="toolTip"> - <string>Press to show details for the selected entry</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_4"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> </layout> </widget> </item> @@ -439,20 +481,23 @@ <tabstops> <tabstop>environmentsComboBox</tabstop> <tabstop>condaMenuButton</tabstop> - <tabstop>packagesList</tabstop> <tabstop>refreshButton</tabstop> <tabstop>upgradeButton</tabstop> <tabstop>upgradeAllButton</tabstop> <tabstop>uninstallButton</tabstop> - <tabstop>searchToggleButton</tabstop> + <tabstop>searchToggleButton_1</tabstop> + <tabstop>packagesList</tabstop> + <tabstop>installButton</tabstop> + <tabstop>showDetailsButton</tabstop> + <tabstop>searchToggleButton_2</tabstop> <tabstop>searchEdit</tabstop> <tabstop>searchButton</tabstop> <tabstop>patternButton</tabstop> <tabstop>fullNameButton</tabstop> <tabstop>packageSpecButton</tabstop> + <tabstop>platformComboBox</tabstop> <tabstop>searchResultList</tabstop> - <tabstop>installButton</tabstop> - <tabstop>showDetailsButton</tabstop> + <tabstop>recheckButton</tabstop> </tabstops> <resources/> <connections/>