1
1

main.cpp 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #include "stdafx.h"
  2. #include "drumduino.h"
  3. #include <QtWidgets/QApplication>
  4. int main(int argc, char* argv[])
  5. {
  6. QApplication::setStyle(QStyleFactory::create("Fusion"));
  7. QPalette p;
  8. //p = qApp->palette();
  9. p.setColor(QPalette::Base, QColor(53, 53, 53)); // lineedit & progress background
  10. p.setColor(QPalette::Window, QColor(53, 53, 53)); //window & combobox background
  11. p.setColor(QPalette::Button, QColor(53, 53, 53)); //tab & button background (light)
  12. p.setColor(QPalette::Text, QColor(255, 255, 255)); //combobox text
  13. p.setColor(QPalette::ButtonText, QColor(255, 255, 255)); // button text
  14. p.setColor(QPalette::WindowText, QColor(0xff6600)); // tab and onWindow text
  15. p.setColor(QPalette::BrightText, QColor(0xff0000)); // ???
  16. p.setColor(QPalette::Shadow, QColor(Qt::black)); // ???
  17. p.setColor(QPalette::Dark, QColor(0xff6600)); // qdial notches
  18. p.setColor(QPalette::Mid, QColor(43, 43, 43)); // ???
  19. p.setColor(QPalette::Midlight, QColor(73, 73, 73)); // ???
  20. p.setColor(QPalette::Light, QColor(93, 93, 93)); // ???
  21. p.setColor(QPalette::NoRole, QColor(0x00ff00)); // ???
  22. p.setColor(QPalette::AlternateBase, QColor(0x00ff00)); // ???
  23. p.setColor(QPalette::ToolTipBase, QColor(0x00ff00)); // ???
  24. p.setColor(QPalette::Link, QColor(0x00ff00)); // ???
  25. p.setColor(QPalette::LinkVisited, QColor(0x00ff00)); // ???
  26. p.setColor(QPalette::HighlightedText, QColor(0xffffff)); //current selection text of combobox
  27. p.setColor(QPalette::Highlight, QColor(0xff9966)); //combobox current selection background, progress chunk background
  28. qApp->setPalette(p);
  29. QApplication a(argc, argv);
  30. Drumduino w;
  31. w.show();
  32. return a.exec();
  33. }
  34. /*
  35. WindowText, Button, Light, Midlight, Dark, Mid,
  36. Text, BrightText, ButtonText, Base, Window, Shadow,
  37. Highlight, HighlightedText,
  38. Link, LinkVisited,
  39. AlternateBase,
  40. NoRole,
  41. ToolTipBase, ToolTipText,
  42. NColorRoles = ToolTipText + 1,
  43. Foreground = WindowText, Background = Window
  44. */