... |
... |
@@ -492,6 +492,17 @@ SettingPanel::createLayout() |
492
|
492
|
foregroundButton_ = new QPushButton(tr("Foreground"), this);
|
493
|
493
|
}
|
494
|
494
|
|
|
495
|
+ generalTab_ = new QWidget(this);
|
|
496
|
+ mmgxTab_ = new QWidget(this);
|
|
497
|
+
|
|
498
|
+ generalTab_->setSizePolicy(QSizePolicy::MinimumExpanding,
|
|
499
|
+ QSizePolicy::MinimumExpanding);
|
|
500
|
+
|
|
501
|
+ tab_ = new QTabWidget(this);
|
|
502
|
+ tab_->setSizePolicy(QSizePolicy::MinimumExpanding,
|
|
503
|
+ QSizePolicy::MinimumExpanding);
|
|
504
|
+
|
|
505
|
+
|
495
|
506
|
if (debugMode_)
|
496
|
507
|
{
|
497
|
508
|
debugLayout_ = new QVBoxLayout;
|
... |
... |
@@ -507,6 +518,23 @@ SettingPanel::createLayout() |
507
|
518
|
gammaLayout_->addWidget(gammaSlider_);
|
508
|
519
|
gammaLayout_->addWidget(gammaValueLabel_);
|
509
|
520
|
|
|
521
|
+ if (comparatorMode_)
|
|
522
|
+ createLayoutComperator();
|
|
523
|
+ else
|
|
524
|
+ createLayoutNormal();
|
|
525
|
+
|
|
526
|
+ mainLayout_ = new QVBoxLayout;
|
|
527
|
+ mainLayout_->addWidget(tab_);
|
|
528
|
+ setLayout(mainLayout_);
|
|
529
|
+ mainLayout_->setContentsMargins(0, 0, 0, 0);
|
|
530
|
+ setContentsMargins(0, 0, 0, 0);
|
|
531
|
+
|
|
532
|
+}
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+void
|
|
536
|
+SettingPanel::createLayoutNormal()
|
|
537
|
+{
|
510
|
538
|
generalTabLayout_ = new QGridLayout;
|
511
|
539
|
|
512
|
540
|
gridLayout2ColAddWidget(generalTabLayout_, hintingCheckBox_);
|
... |
... |
@@ -516,72 +544,86 @@ SettingPanel::createLayout() |
516
|
544
|
|
517
|
545
|
if (debugMode_)
|
518
|
546
|
gridLayout2ColAddLayout(generalTabLayout_, debugLayout_);
|
519
|
|
-
|
520
|
|
- if (!comparatorMode_)
|
521
|
|
- gridLayout2ColAddItem(generalTabLayout_,
|
522
|
|
- new QSpacerItem(0, 20, QSizePolicy::Minimum,
|
523
|
|
- QSizePolicy::MinimumExpanding));
|
|
547
|
+
|
|
548
|
+ gridLayout2ColAddItem(generalTabLayout_,
|
|
549
|
+ new QSpacerItem(0, 20, QSizePolicy::Minimum,
|
|
550
|
+ QSizePolicy::MinimumExpanding));
|
524
|
551
|
|
525
|
552
|
gridLayout2ColAddWidget(generalTabLayout_,
|
526
|
553
|
antiAliasingLabel_, antiAliasingComboBox_);
|
527
|
554
|
gridLayout2ColAddWidget(generalTabLayout_,
|
528
|
555
|
lcdFilterLabel_, lcdFilterComboBox_);
|
|
556
|
+
|
|
557
|
+ gridLayout2ColAddItem(generalTabLayout_,
|
|
558
|
+ new QSpacerItem(0, 20, QSizePolicy::Minimum,
|
|
559
|
+ QSizePolicy::MinimumExpanding));
|
529
|
560
|
|
530
|
|
- if (!comparatorMode_)
|
531
|
|
- gridLayout2ColAddItem(generalTabLayout_,
|
532
|
|
- new QSpacerItem(0, 20, QSizePolicy::Minimum,
|
533
|
|
- QSizePolicy::MinimumExpanding));
|
534
|
|
-
|
535
|
|
- if (!comparatorMode_)
|
536
|
|
- {
|
537
|
|
- colorPickerLayout_ = new QHBoxLayout;
|
538
|
|
- colorPickerLayout_->addWidget(backgroundButton_, 1);
|
539
|
|
- colorPickerLayout_->addWidget(foregroundButton_, 1);
|
540
|
|
- generalTabLayout_->addLayout(colorPickerLayout_,
|
541
|
|
- generalTabLayout_->rowCount(),
|
542
|
|
- 0, 1, 2);
|
543
|
|
- }
|
|
561
|
+ colorPickerLayout_ = new QHBoxLayout;
|
|
562
|
+ colorPickerLayout_->addWidget(backgroundButton_, 1);
|
|
563
|
+ colorPickerLayout_->addWidget(foregroundButton_, 1);
|
|
564
|
+ generalTabLayout_->addLayout(colorPickerLayout_,
|
|
565
|
+ generalTabLayout_->rowCount(), 0, 1, 2);
|
544
|
566
|
|
545
|
567
|
gridLayout2ColAddLayout(generalTabLayout_, gammaLayout_);
|
546
|
568
|
gridLayout2ColAddWidget(generalTabLayout_, embeddedBitmapCheckBox_);
|
547
|
569
|
gridLayout2ColAddWidget(generalTabLayout_, colorLayerCheckBox_);
|
548
|
570
|
gridLayout2ColAddWidget(generalTabLayout_,
|
549
|
571
|
paletteLabel_, paletteComboBox_);
|
550
|
|
-
|
551
|
|
- if (comparatorMode_)
|
552
|
|
- {
|
553
|
|
- gridLayout2ColAddWidget(generalTabLayout_, kerningCheckBox_);
|
554
|
|
- gridLayout2ColAddWidget(generalTabLayout_, lsbRsbDeltaCheckBox_);
|
555
|
|
- }
|
556
|
|
-
|
557
|
|
- if (!comparatorMode_)
|
558
|
|
- gridLayout2ColAddItem(generalTabLayout_,
|
559
|
|
- new QSpacerItem(0, 20, QSizePolicy::Minimum,
|
560
|
|
- QSizePolicy::MinimumExpanding));
|
|
572
|
+
|
|
573
|
+ gridLayout2ColAddItem(generalTabLayout_,
|
|
574
|
+ new QSpacerItem(0, 20, QSizePolicy::Minimum,
|
|
575
|
+ QSizePolicy::MinimumExpanding));
|
561
|
576
|
|
562
|
577
|
generalTabLayout_->setColumnStretch(1, 1);
|
563
|
|
-
|
564
|
|
- generalTab_ = new QWidget(this);
|
565
|
578
|
generalTab_->setLayout(generalTabLayout_);
|
566
|
|
- generalTab_->setSizePolicy(QSizePolicy::MinimumExpanding,
|
567
|
|
- QSizePolicy::MinimumExpanding);
|
568
|
|
-
|
569
|
|
- mmgxTab_ = new QWidget(this);
|
570
|
579
|
|
571
|
|
- tab_ = new QTabWidget(this);
|
572
|
580
|
tab_->addTab(generalTab_, tr("General"));
|
573
|
581
|
tab_->addTab(mmgxTab_, tr("MM/GX"));
|
574
|
|
- tab_->setSizePolicy(QSizePolicy::MinimumExpanding,
|
575
|
|
- QSizePolicy::MinimumExpanding);
|
|
582
|
+}
|
576
|
583
|
|
577
|
|
- mainLayout_ = new QVBoxLayout;
|
578
|
|
- mainLayout_->addWidget(tab_);
|
579
|
|
- setLayout(mainLayout_);
|
580
|
|
- mainLayout_->setContentsMargins(0, 0, 0, 0);
|
581
|
|
- setContentsMargins(0, 0, 0, 0);
|
582
|
584
|
|
583
|
|
- if (comparatorMode_)
|
584
|
|
- setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum);
|
|
585
|
+void
|
|
586
|
+SettingPanel::createLayoutComperator()
|
|
587
|
+{
|
|
588
|
+ hintingRenderingTab_ = new QWidget(this);
|
|
589
|
+
|
|
590
|
+ generalTabLayout_ = new QGridLayout;
|
|
591
|
+ hintingRenderingTabLayout_ = new QGridLayout;
|
|
592
|
+
|
|
593
|
+ // Hinting & Rendering
|
|
594
|
+ gridLayout2ColAddWidget(hintingRenderingTabLayout_, hintingCheckBox_);
|
|
595
|
+ gridLayout2ColAddWidget(hintingRenderingTabLayout_,
|
|
596
|
+ hintingModeLabel_, hintingModeComboBox_);
|
|
597
|
+ gridLayout2ColAddWidget(hintingRenderingTabLayout_, autoHintingCheckBox_);
|
|
598
|
+
|
|
599
|
+ if (debugMode_)
|
|
600
|
+ gridLayout2ColAddLayout(hintingRenderingTabLayout_, debugLayout_);
|
|
601
|
+
|
|
602
|
+ gridLayout2ColAddWidget(hintingRenderingTabLayout_,
|
|
603
|
+ antiAliasingLabel_, antiAliasingComboBox_);
|
|
604
|
+ gridLayout2ColAddWidget(hintingRenderingTabLayout_,
|
|
605
|
+ lcdFilterLabel_, lcdFilterComboBox_);
|
|
606
|
+
|
|
607
|
+ gridLayout2ColAddLayout(hintingRenderingTabLayout_, gammaLayout_);
|
|
608
|
+
|
|
609
|
+ // General
|
|
610
|
+ gridLayout2ColAddWidget(generalTabLayout_, embeddedBitmapCheckBox_);
|
|
611
|
+ gridLayout2ColAddWidget(generalTabLayout_, colorLayerCheckBox_);
|
|
612
|
+ gridLayout2ColAddWidget(generalTabLayout_,
|
|
613
|
+ paletteLabel_, paletteComboBox_);
|
|
614
|
+
|
|
615
|
+ gridLayout2ColAddWidget(generalTabLayout_, kerningCheckBox_);
|
|
616
|
+ gridLayout2ColAddWidget(generalTabLayout_, lsbRsbDeltaCheckBox_);
|
|
617
|
+
|
|
618
|
+ generalTabLayout_->setColumnStretch(1, 1);
|
|
619
|
+ hintingRenderingTabLayout_->setColumnStretch(1, 1);
|
|
620
|
+ generalTab_->setLayout(generalTabLayout_);
|
|
621
|
+ hintingRenderingTab_->setLayout(hintingRenderingTabLayout_);
|
|
622
|
+
|
|
623
|
+ tab_->addTab(hintingRenderingTab_, tr("Hinting && Rendering"));
|
|
624
|
+ tab_->addTab(generalTab_, tr("General"));
|
|
625
|
+ tab_->addTab(mmgxTab_, tr("MM/GX"));
|
|
626
|
+ setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum);
|
585
|
627
|
}
|
586
|
628
|
|
587
|
629
|
|