<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Benjamin C. Meyer &lt;ben@meyerhome.net&gt;
+ * Copyright 2008-2009 Benjamin C. Meyer &lt;ben@meyerhome.net&gt;
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -63,10 +63,6 @@ LocationBar::LocationBar(QWidget *parent)
     setUpdatesEnabled(true);
 
     m_defaultBaseColor = palette().color(QPalette::Base);
-
-    QPalette p = palette();
-    p.setColor(QPalette::Base, QColor(255, 255, 255, 100));
-    setPalette(p);
 }
 
 void LocationBar::setWebView(WebView *webView)
@@ -93,21 +89,8 @@ void LocationBar::webViewUrlChanged(const QUrl &amp;url)
     setCursorPosition(0);
 }
 
-static QLinearGradient generateGradient(const QColor &amp;top, const QColor &amp;middle, int height)
-{
-    QLinearGradient gradient(0, 0, 0, height);
-    gradient.setColorAt(0, top);
-    gradient.setColorAt(0.15, middle.lighter(120));
-    gradient.setColorAt(0.5, middle);
-    gradient.setColorAt(0.85, middle.lighter(120));
-    gradient.setColorAt(1, top);
-    return gradient;
-}
-
 void LocationBar::paintEvent(QPaintEvent *event)
 {
-    QPainter painter(this);
-
     QPalette p = palette();
     QColor backgroundColor = m_defaultBaseColor;
     if (m_webView &amp;&amp; m_webView-&gt;url().scheme() == QLatin1String(&quot;https&quot;)
@@ -116,29 +99,19 @@ void LocationBar::paintEvent(QPaintEvent *event)
         backgroundColor = lightYellow;
     }
 
-    // paint the text background
-    QStyleOptionFrameV2 panel;
-    initStyleOption(&amp;panel);
-    QRect backgroundRect = style()-&gt;subElementRect(QStyle::SE_LineEditContents, &amp;panel, this);
-    painter.setBrush(backgroundColor);
-    painter.setPen(backgroundColor);
-    painter.drawRect(backgroundRect);
-
-    // paint the progressbar
-    if (m_webView &amp;&amp; !hasFocus()) {
+    // set the progress bar
+    if (m_webView) {
         int progress = m_webView-&gt;progress();
         QColor loadingColor = QColor(116, 192, 250);
         if (p.color(QPalette::Text).value() &gt;= 128)
             loadingColor = m_defaultBaseColor.darker(200);
 
-        painter.setBrush(generateGradient(m_defaultBaseColor, loadingColor, height()));
-        painter.setPen(Qt::transparent);
-
-        int mid = backgroundRect.width() * progress / 100;
-        QRect progressRect = QRect(backgroundRect.x(), backgroundRect.y(), mid, backgroundRect.height());
-        painter.drawRect(progressRect);
+        QLinearGradient gradient(0, 0, width(), 0);
+        gradient.setColorAt(0, loadingColor);
+        gradient.setColorAt(((double)progress)/100, backgroundColor);
+        p.setBrush(QPalette::Base, gradient);
+        setPalette(p);
     }
-    painter.end();
 
     LineEdit::paintEvent(event);
 }</diff>
      <filename>src/locationbar/locationbar.cpp</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e5385f342c32fdcbe006d628de82e58e0ee7ad3a</id>
    </parent>
  </parents>
  <author>
    <name>Benjamin C Meyer</name>
    <email>ben@meyerhome.net</email>
  </author>
  <url>http://github.com/faw/arora/commit/0032e7fc9acfba437739e41fca1a29702777c853</url>
  <id>0032e7fc9acfba437739e41fca1a29702777c853</id>
  <committed-date>2009-10-05T21:13:24-07:00</committed-date>
  <authored-date>2009-10-05T20:35:53-07:00</authored-date>
  <message>Location bar painting in KDE is 1px off, drawing a white line under the
line edit.
Issue: 540</message>
  <tree>b42ec5bf104da7836ada73d5038bbc7e4da18836</tree>
  <committer>
    <name>Benjamin C Meyer</name>
    <email>ben@meyerhome.net</email>
  </committer>
</commit>
