# [PATCH] qgit: increase the space between the lanes.

6 messages from 2006-01-03 to 2006-01-04. Participants: Martin Atukunda, Marco Costalba.
Thread: https://gitlist.dev/t/2957

## Martin Atukunda, 2006-01-03 11:15

Subject: [PATCH] qgit: increase the space between the lanes.
Message-ID: <200601031415.19309.matlads@dsmagic.com>
URL: https://gitlist.dev/e/200601031415.19309.matlads%40dsmagic.com

```
There are probably better ways of doing this.

Signed-off-by: Martin Atukunda <matlads@dsmagic.com>

---

 src/mainimpl.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

28ddfe1297a5e1e212fc35c3419cf8364415847e
diff --git a/src/mainimpl.cpp b/src/mainimpl.cpp
index d7c4e39..1b1f0f0 100644
--- a/src/mainimpl.cpp
+++ b/src/mainimpl.cpp
@@ -1409,7 +1409,7 @@ void MainImpl::setupPixmaps() {
 	// little hack to read items height
 	new QListViewItem(listViewLog);
 	ph = listViewLog->firstChild()->height();
-	pw = ph / 2;
+	pw = ph / 2 + 4;
 	listViewLog->clear(); // remove and deletes items
 	QPixmap cm(pw, ph);
 	cm.fill();
@@ -1443,17 +1443,17 @@ void MainImpl::setupPixmaps() {
 		case MERGE_FORK:
 			p.drawLine(P_90, P_270);
 			p.drawLine(P_180, P_0);
-			p.drawRect(pw/4, ph/4, pw/2, ph/2);
+			p.drawRect(pw/4+1, ph/4, pw/2, ph/2);
 			break;
 		case MERGE_FORK_R:
 			p.drawLine(P_90, P_270);
 			p.drawLine(P_180, P_OR);
-			p.drawRect(pw/4, ph/4, pw/2, ph/2);
+			p.drawRect(pw/4+1, ph/4, pw/2, ph/2);
 			break;
 		case MERGE_FORK_L:
 			p.drawLine(P_90, P_270);
 			p.drawLine(P_OR, P_0);
-			p.drawRect(pw/4, ph/4, pw/2, ph/2);
+			p.drawRect(pw/4+1, ph/4, pw/2, ph/2);
 			break;
 		case JOIN:
 			p.drawLine(P_90, P_270);
-- 
1.0.GIT

```

## Marco Costalba, 2006-01-03 15:49

Subject: Re: [PATCH] qgit: increase the space between the lanes.
Message-ID: <43BA9CFA.8050208@yahoo.it>
URL: https://gitlist.dev/e/43BA9CFA.8050208%40yahoo.it
In-Reply-To: <200601031415.19309.matlads@dsmagic.com>

```
Martin Atukunda wrote:
> There are probably better ways of doing this.
> 
> Signed-off-by: Martin Atukunda <matlads@dsmagic.com>
> 
> ---
> 
Thanks for the patch. Almost applied ;-)

The incresed lines spacing is good. But unluckly the merge/fork symbols
don't appear as good, at least in my box:

http://digilander.libero.it/mcostalba/qgitOriginal.png

http://digilander.libero.it/mcostalba/qgitModified.png

If it _could_ be possible to fill with color the merge symbols it would be great.

Do you mind to do it yourself? if not I will do that.

Thanks
Marco

	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it

```

## Martin Atukunda, 2006-01-03 16:49

Subject: Re: [PATCH] qgit: increase the space between the lanes.
Message-ID: <200601031949.59822.matlads@dsmagic.com>
URL: https://gitlist.dev/e/200601031949.59822.matlads%40dsmagic.com
In-Reply-To: <43BA9CFA.8050208@yahoo.it>

```
On Tuesday 03 January 2006 18:49, Marco Costalba wrote:
>
> If it _could_ be possible to fill with color the merge symbols it would be
> great.
>
> Do you mind to do it yourself? if not I will do that.

Something like this?
---

[PATCH] qgit: increase the space between the lanes.

This commit increases the space between the lanes. It also cators/adjusts for
the look of the merge/fork symbols.

Signed-off-by: Martin Atukunda <matlads@dsmagic.com>

---

 src/mainimpl.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

eb82c3b5bda7970bf743a3b1fa9df8a943f3b9ed
diff --git a/src/mainimpl.cpp b/src/mainimpl.cpp
index d7c4e39..9430e1b 100644
--- a/src/mainimpl.cpp
+++ b/src/mainimpl.cpp
@@ -1409,7 +1409,7 @@ void MainImpl::setupPixmaps() {
 	// little hack to read items height
 	new QListViewItem(listViewLog);
 	ph = listViewLog->firstChild()->height();
-	pw = ph / 2;
+	pw = ph / 2 + 4;
 	listViewLog->clear(); // remove and deletes items
 	QPixmap cm(pw, ph);
 	cm.fill();
@@ -1443,17 +1443,17 @@ void MainImpl::setupPixmaps() {
 		case MERGE_FORK:
 			p.drawLine(P_90, P_270);
 			p.drawLine(P_180, P_0);
-			p.drawRect(pw/4, ph/4, pw/2, ph/2);
+			p.drawRect(pw/4+1, ph/4, pw/2-1, ph/2);
 			break;
 		case MERGE_FORK_R:
 			p.drawLine(P_90, P_270);
 			p.drawLine(P_180, P_OR);
-			p.drawRect(pw/4, ph/4, pw/2, ph/2);
+			p.drawRect(pw/4+1, ph/4, pw/2-1, ph/2);
 			break;
 		case MERGE_FORK_L:
 			p.drawLine(P_90, P_270);
 			p.drawLine(P_OR, P_0);
-			p.drawRect(pw/4, ph/4, pw/2, ph/2);
+			p.drawRect(pw/4+1, ph/4, pw/2-1, ph/2);
 			break;
 		case JOIN:
 			p.drawLine(P_90, P_270);
-- 
1.0.6-g58e3

```

## Martin Atukunda, 2006-01-03 17:07

Subject: Re: [PATCH] qgit: increase the space between the lanes.
Message-ID: <200601032007.09081.matlads@dsmagic.com>
URL: https://gitlist.dev/e/200601032007.09081.matlads%40dsmagic.com
In-Reply-To: <200601031949.59822.matlads@dsmagic.com>

```
On Tuesday 03 January 2006 19:49, Martin Atukunda wrote:
> On Tuesday 03 January 2006 18:49, Marco Costalba wrote:
> > If it _could_ be possible to fill with color the merge symbols it would
> > be great.
> >
> > Do you mind to do it yourself? if not I will do that.
>
> Something like this?

Sorry, but it appears that the patches i've been sending out work only for 
certain font sizes! Hmmm.

see these 3 screenshots (with the previous patch):

http://mail.ds.co.ug/~matlads/qgit/

Hmm, I need to re-think how to do this properly. Any ideas?

- Martin -

```

## Marco Costalba, 2006-01-03 22:17

Subject: Re: [PATCH] qgit: increase the space between the lanes.
Message-ID: <43BAF7F2.6060906@yahoo.it>
URL: https://gitlist.dev/e/43BAF7F2.6060906%40yahoo.it
In-Reply-To: <200601032007.09081.matlads@dsmagic.com>

```
Martin Atukunda wrote:
> 
> Hmm, I need to re-think how to do this properly. Any ideas?
> 

Hi Martin,


What about this?

If it is Ok for you I will push the change.



Marco


diff --git a/src/mainimpl.cpp b/src/mainimpl.cpp
index 2f26b01..40a22e8 100644
--- a/src/mainimpl.cpp
+++ b/src/mainimpl.cpp
@@ -1451,7 +1451,7 @@ void MainImpl::setupPixmaps() {
  	// little hack to read items height
  	new QListViewItem(listViewLog);
  	ph = listViewLog->firstChild()->height();
-	pw = ph / 2;
+	pw = 3 * ph / 4;
  	listViewLog->clear(); // remove and deletes items
  	QPixmap cm(pw, ph);
  	cm.fill();
@@ -1470,12 +1470,13 @@ void MainImpl::setupPixmaps() {
  		p.begin(pm);
  		p.setPen(QPen(colors[i % COLORS_NUM], 2));
  		int type = (i / COLORS_NUM) + 1;
+		QBrush myBrush(QBrush(colors[i % COLORS_NUM], Qt::SolidPattern));
  		switch(type) {
  		case ACTIVE:
  			p.drawLine(P_90, P_270);
  			p.save();
  			p.setPen(QPen(colors[i % COLORS_NUM], 1));
-			p.setBrush(QBrush(colors[i % COLORS_NUM], Qt::SolidPattern));
+			p.setBrush(myBrush);
  			p.drawEllipse(pw/8, ph/8, 6*pw/8, 3*ph/8);
  			p.restore();
  			break;
@@ -1485,17 +1486,20 @@ void MainImpl::setupPixmaps() {
  		case MERGE_FORK:
  			p.drawLine(P_90, P_270);
  			p.drawLine(P_180, P_0);
-			p.drawRect(pw/4, ph/4, pw/2, ph/2);
+			p.fillRect (pw/4, ph/4, pw/2, ph/2, myBrush);
+			p.drawRoundRect(pw/4, ph/4, pw/2, ph/2, 25, 25);
  			break;
  		case MERGE_FORK_R:
  			p.drawLine(P_90, P_270);
  			p.drawLine(P_180, P_OR);
-			p.drawRect(pw/4, ph/4, pw/2, ph/2);
+			p.fillRect (pw/4, ph/4, pw/2, ph/2, myBrush);
+			p.drawRoundRect(pw/4, ph/4, pw/2, ph/2, 25, 25);
  			break;
  		case MERGE_FORK_L:
  			p.drawLine(P_90, P_270);
  			p.drawLine(P_OR, P_0);
-			p.drawRect(pw/4, ph/4, pw/2, ph/2);
+			p.fillRect (pw/4, ph/4, pw/2, ph/2, myBrush);
+			p.drawRoundRect(pw/4, ph/4, pw/2, ph/2, 25, 25);
  			break;
  		case JOIN:
  			p.drawLine(P_90, P_270);


	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it

```

## Martin Atukunda, 2006-01-04 08:24

Subject: Re: [PATCH] qgit: increase the space between the lanes.
Message-ID: <200601041124.43749.matlads@dsmagic.com>
URL: https://gitlist.dev/e/200601041124.43749.matlads%40dsmagic.com
In-Reply-To: <43BAF7F2.6060906@yahoo.it>

```
On Wednesday 04 January 2006 01:17, Marco Costalba wrote:
> Martin Atukunda wrote:
> > Hmm, I need to re-think how to do this properly. Any ideas?
>
> Hi Martin,
>
>
> What about this?
>
> If it is Ok for you I will push the change.
>
Looks Good. Please apply.

- Martin -

-- 
Due to a shortage of devoted followers, the production of great leaders has 
been discontinued.

```
