Skip to content

Commit

Permalink
fixed Bug: Flicable in BudgetView not clipping
Browse files Browse the repository at this point in the history
  • Loading branch information
thmichel committed May 20, 2015
1 parent 83c26e9 commit 72e7923
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions car.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,6 @@ double Car::budget_fuel_total()
}
double Car::budget_fuel()
{
<<<<<<< HEAD
/* Return sum(fuel price) / ODO * 100 */
unsigned long int maxDistance = 0;
unsigned long int minDistance = 999999999;
Expand Down Expand Up @@ -736,8 +735,6 @@ double Car::budget_invest()
double Car::budget_tire()
{
//returns tire costs per 100km
=======
>>>>>>> upstream/master
return budget_tire_total() / ((maxdistance() - mindistance())/ 100.0);
}
double Car::budget_tire_total()
Expand Down
5 changes: 3 additions & 2 deletions qml/pages/BudgetView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ Page {
id: pieChart
width: { return parent.width < parent.height ? parent.width/2 : parent.height/2 }
height: { return parent.width < parent.height ? parent.width/2 : parent.height/2 }
//width: budgetPage.width/2
//height:budgetPage.height/2
anchors.top: header.bottom
anchors.left: parent.left

onPaint: {
var ctx = pieChart.getContext('2d')
ctx.clearRect(0,0,width,height)
Expand Down Expand Up @@ -182,6 +181,8 @@ Page {
leftMargin: Theme.paddingMedium
rightMargin: Theme.paddingMedium
contentHeight: dataColumn.height
clip:true

Column {
id: dataColumn
width: parent.width- Theme.paddingMedium - Theme.paddingMedium
Expand Down

0 comments on commit 72e7923

Please sign in to comment.