Skip to content

Commit

Permalink
Merge pull request #64 from shundhammer/huha-status-col-width
Browse files Browse the repository at this point in the history
Initial Status Column Width
  • Loading branch information
shundhammer committed Mar 13, 2019
2 parents 3106375 + 3f98f9c commit a69b2fb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION.cmake
@@ -1,6 +1,6 @@
SET( VERSION_MAJOR "2" )
SET( VERSION_MINOR "45" )
SET( VERSION_PATCH "26" )
SET( VERSION_PATCH "27" )
SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" )

##### This is need for the libyui core, ONLY.
Expand Down
2 changes: 1 addition & 1 deletion package/libyui-qt-pkg-doc.spec
Expand Up @@ -20,7 +20,7 @@
%define so_version 9

Name: %{parent}-doc
Version: 2.45.26
Version: 2.45.27
Release: 0
Source: %{parent}-%{version}.tar.bz2

Expand Down
6 changes: 6 additions & 0 deletions package/libyui-qt-pkg.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Mar 12 15:49:33 UTC 2019 - Stefan Hundhammer <shundhammer@suse.com>

- Revert to previous initial status column width (bsc#1127708)
- 2.45.27

-------------------------------------------------------------------
Thu Feb 14 10:42:58 UTC 2019 - Stasiek Michalski <hellcp@mailbox.org>

Expand Down
2 changes: 1 addition & 1 deletion package/libyui-qt-pkg.spec
Expand Up @@ -17,7 +17,7 @@


Name: libyui-qt-pkg
Version: 2.45.26
Version: 2.45.27
Release: 0
Source: %{name}-%{version}.tar.bz2

Expand Down
5 changes: 3 additions & 2 deletions src/YQPkgList.cc
Expand Up @@ -66,6 +66,7 @@ using std::max;

#define SINGLE_VERSION_COL 1
#define STATUS_ICON_SIZE 16
#define STATUS_COL_WIDTH 28


YQPkgList::YQPkgList( QWidget * parent )
Expand Down Expand Up @@ -323,7 +324,7 @@ YQPkgList::updateOptimalColumnWidthValues(ZyppSel selectable, ZyppPkg zyppPkg)
const ZyppObj candidate = selectable->candidateObj();
const ZyppObj installed = selectable->installedObj();
// Status icon:
_optimalColWidth_statusIcon = STATUS_ICON_SIZE;
_optimalColWidth_statusIcon = STATUS_COL_WIDTH;
// Name:
qstr = QString::fromUtf8( zyppPkg->name().c_str() );
qstr_width = fm.boundingRect( qstr ).width() + ( STATUS_ICON_SIZE / 2 );
Expand Down Expand Up @@ -385,7 +386,7 @@ YQPkgList::optimizeColumnWidths()
int statusIconColWidth = _optimalColWidth_statusIcon;

if (statusIconColWidth == 0)
statusIconColWidth = STATUS_ICON_SIZE;
statusIconColWidth = STATUS_COL_WIDTH;
optimalWidthsSum = _optimalColWidth_statusIcon + _optimalColWidth_name + _optimalColWidth_summary + _optimalColWidth_version + _optimalColWidth_size;
if ( instVersionCol() != versionCol() )
{
Expand Down

0 comments on commit a69b2fb

Please sign in to comment.