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