View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000233 | Double Commander | Graphical user interface | public | 2011-11-13 17:02 | 2014-01-14 22:52 |
Reporter | SOLON7 | Assigned To | Alexx2000 | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Projection | none | ETA | none | ||
Fixed in Version | 0.5.5 | ||||
Summary | 0000233: Новый графический стиль Фонового копирования | ||||
Description | Привет Господа Внедрите пожалуйста следующий код в ночную сборку.. Нужно Добавить Функцию Lighter. И заменить процедуру sboxOperationsPaint. Зеленый- Активен. Оранжевый- в очереди. Красный остановлен !! function Lighter(Color:TColor; Percent:Byte):TColor; var r, g, b: Byte; begin Color:=ColorToRGB(Color); r:=GetRValue(Color); g:=GetGValue(Color); b:=GetBValue(Color); r:=r+muldiv(255-r,Percent,100); //процент% увеличения яркости g:=g+muldiv(255-g,Percent,100); b:=b+muldiv(255-b,Percent,100); result:=RGB(r,g,b); end; procedure TfrmMain.sboxOperationsPaint(Sender: TObject); var Operation: TFileSourceOperation; OperationHandle: TOperationHandle; StartingState: TOperationStartingState; i, textHeight: Integer; OutString: String; rect1:trect; HeightSbox:integer; Col1,Col2:tcolor; begin if OperationsManager.OperationsCount > 0 then begin HeightSbox:=sboxOperations.Height; Rect1:= sboxOperations.ClientRect;//Rect (3,1,pbxDrive.Width-3,pbxDrive.Height-2); //dec(rect1.Left); // dec(rect1.Top); // sboxOperations.Canvas.Brush.Color := cl3DDkShadow; sboxOperations.Canvas.Pen.Color:=cl3DDkShadow; sboxOperations.Canvas.Rectangle(rect1); inc(rect1.Left); inc(rect1.Top); dec(rect1.Right,2); dec(rect1.Bottom); sboxOperations.Canvas.GradientFill(rect1,Lighter(clBtnHiLight,20),clBtnFace, gdVertical); // Calculate text height textHeight:= sboxOperations.Canvas.TextHeight('Pg'); // Calculate item width if (sboxOperations.Width / OperationsManager.OperationsCount) < 120 then widthOfItem := Round(sboxOperations.Width / OperationsManager.OperationsCount) else widthOfItem := 120; for i := 0 to OperationsManager.OperationsCount - 1 do begin if (i=ItemEnd) and (PressLMB) or (i=IndexFocus) and (PressLMB) then begin sboxOperations.Canvas.Brush.Color := clMenuHighlight; sboxOperations.Canvas.Rectangle(10 + (widthOfItem * i), 5, widthOfItem-10 + (widthOfItem * i), sboxOperations.Height - 8); if IndexFocus<>ItemEnd then OutString:= 'Move here' else OutString:= 'Move from'; if i= IndexFocus then OutString:= 'Move from'; sboxOperations.Canvas.TextOut(18 + (widthOfItem * i), 7, OutString); end else begin Operation := OperationsManager.GetOperationByIndex(i); if Assigned(Operation) then begin OperationHandle := OperationsManager.GetHandleById(i); case Operation.ID of fsoCopy, fsoCopyIn, fsoCopyOut: OutString := 'Copying'; fsoMove: OutString := 'Moving'; fsoDelete: OutString := 'Delete'; fsoWipe: OutString := 'Erasing'; fsoCalcChecksum: OutString := 'Counting'; else OutString := 'Unknown'; end; OutString := IntToStr(OperationHandle) + ': ' + OutString + ' - ' + FloatToStrF(Operation.Progress * 100, ffFixed, 0, 0) + ' %'; StartingState := OperationsManager.GetStartingState(OperationHandle); if OperationsManager.GetFormCreate (OperationHandle) = True then sboxOperations.Canvas.Brush.Color := clBtnShadow else // sboxOperations.Canvas.Brush.Color := Canvas.Brush.Color; sboxOperations.Canvas.pen.Color := Lighter(cl3DDkShadow,40); sboxOperations.Canvas.Brush.Style:=bsClear; // Draw border sboxOperations.Canvas.Rectangle(2 + (widthOfItem * i), 2, widthOfItem + (widthOfItem * i), HeightSbox-2); // set progress bar color by operation state // sboxOperations.Canvas.Brush.Color := clRed; // If it is stopped then it should be red Col1:=RGB(255,153,149); Col2:=RGB(255,110,103); if (StartingState in [ossQueueIn, ossQueueFirst, ossQueueLast]) then // Blue if in queue begin // Col1:=RGB(219,229,242); // Col2:=RGB(149,179,215); Col1:=RGB(255,202,100); Col2:=RGB(255,153,4); end; if Operation.State = fsosRunning then //Orange if running begin Col1:=RGB(203,233,171); Col2:=RGB(146,208,80); end; // Draw progress bar rect1.TopLeft.x:= 3+ (widthOfItem * i); rect1.TopLeft.y:=3; rect1.BottomRight.x:=Round(5 + (widthOfItem * i) + (widthOfItem - 10) * Operation.Progress); rect1.BottomRight.y:=HeightSbox-3; sboxOperations.Canvas.GradientFill(rect1,col1,col2, gdVertical); // sboxOperations.Canvas.FillRect( // 3 + (widthOfItem * i), // 2 + textHeight, // Round(5 + (widthOfItem * i) + (widthOfItem - 10) * Operation.Progress), // 10 + textHeight); // Draw output string sboxOperations.Canvas.TextOut(3 + (widthOfItem * i), 2, OutString); end; end; end; end; end; | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Fixed in Revision | 4090 | ||||
Operating system | Windows | ||||
Widgetset | Win32 | ||||
Architecture | 32-bit | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2011-11-13 17:02 | SOLON7 | New Issue | |
2011-11-13 17:02 | SOLON7 | File Added: r1.PNG | |
2011-11-13 17:02 | SOLON7 | Assigned To | => SOLON7 |
2011-11-13 17:02 | SOLON7 | Status | new => assigned |
2011-11-13 17:02 | SOLON7 | Status | assigned => confirmed |
2011-11-14 05:53 | SOLON7 | Description Updated | |
2011-11-14 05:54 | SOLON7 | File Deleted: r1.PNG | |
2011-11-14 05:54 | SOLON7 | File Added: Безымянный.PNG | |
2011-11-14 05:55 | SOLON7 | Note Added: 0000137 | |
2011-11-15 10:59 | SOLON7 | Assigned To | SOLON7 => cobines |
2011-11-15 10:59 | SOLON7 | Status | confirmed => assigned |
2011-11-15 11:00 | SOLON7 | Note Added: 0000138 | |
2011-11-16 20:09 | SOLON7 | Assigned To | cobines => Alexx2000 |
2011-11-16 21:50 | Alexx2000 | Fixed in Revision | => 4090 |
2011-11-16 21:50 | Alexx2000 | Status | assigned => resolved |
2011-11-16 21:50 | Alexx2000 | Fixed in Version | => 0.5.5 |
2011-11-16 21:50 | Alexx2000 | Resolution | open => fixed |
2014-01-14 22:52 | Alexx2000 | Status | resolved => closed |