mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 14:59:54 +00:00
Improve operations widget formatting
This commit is contained in:
parent
67c47b8603
commit
6c83451b15
2 changed files with 24 additions and 23 deletions
|
@ -70,6 +70,7 @@ void CSVDoc::Operation::initWidgets()
|
|||
mProgressBar = new QProgressBar();
|
||||
mAbortButton = new QPushButton("Abort");
|
||||
mLayout = new QHBoxLayout();
|
||||
mLayout->setContentsMargins(8, 4, 8, 4);
|
||||
|
||||
mLayout->addWidget(mProgressBar);
|
||||
mLayout->addWidget(mAbortButton);
|
||||
|
@ -101,10 +102,10 @@ void CSVDoc::Operation::setBarColor(int type)
|
|||
"margin: 2px 2px 2px 2px;"
|
||||
"}";
|
||||
|
||||
QString topColor = "#F2F6F8";
|
||||
QString bottomColor = "#E0EFF9";
|
||||
QString midTopColor = "#D8E1E7";
|
||||
QString midBottomColor = "#B5C6D0"; // default gray gloss
|
||||
QString topColor = "#9e9e9e";
|
||||
QString bottomColor = "#919191";
|
||||
QString midTopColor = "#848484";
|
||||
QString midBottomColor = "#717171"; // default gray
|
||||
|
||||
// colors inspired by samples from:
|
||||
// http://www.colorzilla.com/gradient-editor/
|
||||
|
@ -113,34 +114,34 @@ void CSVDoc::Operation::setBarColor(int type)
|
|||
{
|
||||
case CSMDoc::State_Saving:
|
||||
|
||||
topColor = "#FECCB1";
|
||||
midTopColor = "#F17432";
|
||||
midBottomColor = "#EA5507";
|
||||
bottomColor = "#FB955E"; // red gloss #2
|
||||
topColor = "#f27d6e";
|
||||
midTopColor = "#ee6954";
|
||||
midBottomColor = "#f05536";
|
||||
bottomColor = "#de511e"; // red
|
||||
break;
|
||||
|
||||
case CSMDoc::State_Searching:
|
||||
|
||||
topColor = "#6DB3F2";
|
||||
midTopColor = "#54A3EE";
|
||||
midBottomColor = "#3690F0";
|
||||
bottomColor = "#1E69DE"; // blue gloss #3
|
||||
topColor = "#6db3f2";
|
||||
midTopColor = "#54a3ee";
|
||||
midBottomColor = "#3690f0";
|
||||
bottomColor = "#1e69de"; // blue
|
||||
break;
|
||||
|
||||
case CSMDoc::State_Verifying:
|
||||
|
||||
topColor = "#BFD255";
|
||||
midTopColor = "#8EB92A";
|
||||
midBottomColor = "#72AA00";
|
||||
bottomColor = "#9ECB2D"; // green gloss
|
||||
topColor = "#bfd255";
|
||||
midTopColor = "#8eb92a";
|
||||
midBottomColor = "#72aa00";
|
||||
bottomColor = "#9ecb2d"; // green
|
||||
break;
|
||||
|
||||
case CSMDoc::State_Merging:
|
||||
|
||||
topColor = "#F3E2C7";
|
||||
midTopColor = "#C19E67";
|
||||
midBottomColor = "#B68D4C";
|
||||
bottomColor = "#E9D4B3"; // l Brown 3D
|
||||
topColor = "#d89188";
|
||||
midTopColor = "#d07f72";
|
||||
midBottomColor = "#cc6d5a";
|
||||
bottomColor = "#b86344"; // brown
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,18 +10,18 @@
|
|||
|
||||
namespace
|
||||
{
|
||||
constexpr int operationLineHeight = 40;
|
||||
constexpr int operationLineHeight = 36;
|
||||
}
|
||||
|
||||
CSVDoc::Operations::Operations()
|
||||
{
|
||||
/// \todo make widget height fixed (exactly the height required to display all operations)
|
||||
|
||||
setFeatures(QDockWidget::NoDockWidgetFeatures);
|
||||
|
||||
QWidget* widgetContainer = new QWidget(this);
|
||||
mLayout = new QVBoxLayout;
|
||||
mLayout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
widgetContainer->setContentsMargins(0, 0, 0, 0);
|
||||
widgetContainer->setLayout(mLayout);
|
||||
setWidget(widgetContainer);
|
||||
setVisible(false);
|
||||
|
|
Loading…
Reference in a new issue