diff --git a/x11/qt3/patches/patch-mkspecs_openbsd-g++_qmake_conf b/x11/qt3/patches/patch-mkspecs_openbsd-g++_qmake_conf index 8e62fdd9d7f..aab6ebb7f20 100644 --- a/x11/qt3/patches/patch-mkspecs_openbsd-g++_qmake_conf +++ b/x11/qt3/patches/patch-mkspecs_openbsd-g++_qmake_conf @@ -1,6 +1,6 @@ -$OpenBSD: patch-mkspecs_openbsd-g++_qmake_conf,v 1.2 2002/03/28 11:47:18 espie Exp $ +$OpenBSD: patch-mkspecs_openbsd-g++_qmake_conf,v 1.3 2002/04/09 14:19:40 espie Exp $ --- mkspecs/openbsd-g++/qmake.conf.orig Mon Mar 18 10:45:57 2002 -+++ mkspecs/openbsd-g++/qmake.conf Thu Mar 28 03:28:04 2002 ++++ mkspecs/openbsd-g++/qmake.conf Tue Apr 9 16:03:45 2002 @@ -8,6 +8,7 @@ MAKEFILE_GENERATOR = UNIX TEMPLATE = app CONFIG += qt warn_on release diff --git a/x11/qt3/patches/patch-src_styles_qcommonstyle_cpp b/x11/qt3/patches/patch-src_styles_qcommonstyle_cpp new file mode 100644 index 00000000000..2e1ecf37c09 --- /dev/null +++ b/x11/qt3/patches/patch-src_styles_qcommonstyle_cpp @@ -0,0 +1,51 @@ +$OpenBSD: patch-src_styles_qcommonstyle_cpp,v 1.1 2002/04/09 14:19:40 espie Exp $ +--- src/styles/qcommonstyle.cpp.orig Mon Mar 18 10:46:27 2002 ++++ src/styles/qcommonstyle.cpp Tue Apr 9 16:11:12 2002 +@@ -702,9 +702,9 @@ void QCommonStyle::drawControl( ControlE + case CE_ProgressBarContents: + { + const QProgressBar *progressbar = (const QProgressBar *) widget; +- + bool reverse = QApplication::reverseLayout(); +- int w = r.width() - 4; ++ int fw = 2; ++ int w = r.width() - 2*fw; + if ( !progressbar->totalSteps() ) { + // draw busy indicator + int x = progressbar->progress() % (w * 2); +@@ -712,7 +712,7 @@ void QCommonStyle::drawControl( ControlE + x = 2 * w - x; + x = reverse ? r.right() - x : x + r.x(); + p->setPen( QPen(cg.highlight(), 4) ); +- p->drawLine(x, r.y() + 1, x, r.height() - 2); ++ p->drawLine(x, r.y() + 1, x, r.height() - fw); + } else { + const int unit_width = pixelMetric(PM_ProgressBarChunkWidth, widget); + int u; +@@ -721,7 +721,7 @@ void QCommonStyle::drawControl( ControlE + else + u = w / unit_width; + int p_v = progressbar->progress(); +- int t_s = progressbar->totalSteps(); ++ int t_s = progressbar->totalSteps() ? progressbar->totalSteps() : 1; + + if ( u > 0 && p_v >= INT_MAX / u && t_s >= u ) { + // scale down to something usable. +@@ -731,7 +731,7 @@ void QCommonStyle::drawControl( ControlE + + // nu < tnu, if last chunk is only a partial chunk + int tnu, nu; +- tnu = nu = p_v * u / (t_s - 1); ++ tnu = nu = p_v * u / t_s; + + if (nu * unit_width > w) + nu--; +@@ -742,7 +742,7 @@ void QCommonStyle::drawControl( ControlE + // display at the end. + int x = 0; + int x0 = reverse ? r.right() - ((unit_width > 1) ? +- unit_width : 2) : r.x() + 2; ++ unit_width : fw) : r.x() + fw; + for (int i=0; irect().isNull() ) ++ return; + QSharedDoubleBuffer buffer( this, e->rect() ); + + buffer.painter()->setBrushOrigin( rect().bottomLeft() );