comparison libgui/src/settings-dialog.ui @ 20051:72fe9df87fe8

improve scalability of gui objects (as discussed in bug #41938) * files-dock-widget.cc (files_dock_widget): adjust size policy of combo box * history-dock-widget.cc (history_dock_widget): adjust size policy of combo box * workspace-view.cc (workspace_view): adjust size policy of combo box * file-editor-tab.cc (file_editor_tab): make size of eol, line and col indicator depending on font size * main-window.cc (construct_tool_bar): make size of combo box for worling dir depending on font size and adjust size policy * main-window.h: remove static variable for combo box width * settings-dialog.cc (read_lexer_settings): make width of labels and font combo boxes for editor styles depeding on font size * settings-dialog.ui: adjusted size policies of several objects
author Torsten <ttl@justmail.de>
date Tue, 24 Feb 2015 07:12:13 +0100
parents 1f66ff2a60a1
children 597fc0fd8e54
comparison
equal deleted inserted replaced
20050:29692bc97899 20051:72fe9df87fe8
30 <width>0</width> 30 <width>0</width>
31 <height>0</height> 31 <height>0</height>
32 </size> 32 </size>
33 </property> 33 </property>
34 <property name="currentIndex"> 34 <property name="currentIndex">
35 <number>3</number> 35 <number>1</number>
36 </property> 36 </property>
37 <widget class="QWidget" name="tab_general"> 37 <widget class="QWidget" name="tab_general">
38 <property name="enabled"> 38 <property name="enabled">
39 <bool>true</bool> 39 <bool>true</bool>
40 </property> 40 </property>
452 <property name="geometry"> 452 <property name="geometry">
453 <rect> 453 <rect>
454 <x>0</x> 454 <x>0</x>
455 <y>0</y> 455 <y>0</y>
456 <width>662</width> 456 <width>662</width>
457 <height>661</height> 457 <height>673</height>
458 </rect> 458 </rect>
459 </property> 459 </property>
460 <layout class="QVBoxLayout" name="verticalLayout_16"> 460 <layout class="QVBoxLayout" name="verticalLayout_16">
461 <item> 461 <item>
462 <layout class="QVBoxLayout" name="verticalLayout_9"> 462 <layout class="QVBoxLayout" name="verticalLayout_9">
463 <item> 463 <item>
464 <layout class="QGridLayout" name="editor_common_settings_grid"> 464 <layout class="QGridLayout" name="editor_common_settings_grid">
465 <property name="horizontalSpacing">
466 <number>6</number>
467 </property>
468 <item row="6" column="2"> 465 <item row="6" column="2">
469 <layout class="QHBoxLayout" name="horizontalLayout_3"> 466 <layout class="QHBoxLayout" name="horizontalLayout_3">
470 <item> 467 <item>
471 <widget class="QLabel" name="editor_long_line_column_text"> 468 <widget class="QLabel" name="editor_long_line_column_text">
472 <property name="text"> 469 <property name="text">
474 </property> 471 </property>
475 </widget> 472 </widget>
476 </item> 473 </item>
477 <item> 474 <item>
478 <widget class="QSpinBox" name="editor_long_line_column"> 475 <widget class="QSpinBox" name="editor_long_line_column">
476 <property name="sizePolicy">
477 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
478 <horstretch>0</horstretch>
479 <verstretch>0</verstretch>
480 </sizepolicy>
481 </property>
479 <property name="minimum"> 482 <property name="minimum">
480 <number>2</number> 483 <number>2</number>
481 </property> 484 </property>
482 <property name="maximum"> 485 <property name="maximum">
483 <number>256</number> 486 <number>256</number>
502 </item> 505 </item>
503 </layout> 506 </layout>
504 </item> 507 </item>
505 <item row="3" column="0"> 508 <item row="3" column="0">
506 <widget class="QCheckBox" name="editor_ws_checkbox"> 509 <widget class="QCheckBox" name="editor_ws_checkbox">
510 <property name="sizePolicy">
511 <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
512 <horstretch>0</horstretch>
513 <verstretch>0</verstretch>
514 </sizepolicy>
515 </property>
507 <property name="text"> 516 <property name="text">
508 <string>Show whitespace</string> 517 <string>Show whitespace</string>
509 </property> 518 </property>
510 </widget> 519 </widget>
511 </item> 520 </item>
512 <item row="2" column="0"> 521 <item row="2" column="0">
513 <widget class="QCheckBox" name="editor_showLineNumbers"> 522 <widget class="QCheckBox" name="editor_showLineNumbers">
514 <property name="enabled"> 523 <property name="enabled">
515 <bool>true</bool> 524 <bool>true</bool>
525 </property>
526 <property name="sizePolicy">
527 <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
528 <horstretch>0</horstretch>
529 <verstretch>0</verstretch>
530 </sizepolicy>
516 </property> 531 </property>
517 <property name="text"> 532 <property name="text">
518 <string>Show line numbers</string> 533 <string>Show line numbers</string>
519 </property> 534 </property>
520 </widget> 535 </widget>
545 <item row="5" column="0"> 560 <item row="5" column="0">
546 <widget class="QCheckBox" name="editor_highlightCurrentLine"> 561 <widget class="QCheckBox" name="editor_highlightCurrentLine">
547 <property name="enabled"> 562 <property name="enabled">
548 <bool>true</bool> 563 <bool>true</bool>
549 </property> 564 </property>
565 <property name="sizePolicy">
566 <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
567 <horstretch>0</horstretch>
568 <verstretch>0</verstretch>
569 </sizepolicy>
570 </property>
550 <property name="text"> 571 <property name="text">
551 <string>Highlight current line</string> 572 <string>Highlight current line</string>
552 </property> 573 </property>
553 </widget> 574 </widget>
554 </item> 575 </item>
623 </property> 644 </property>
624 </widget> 645 </widget>
625 </item> 646 </item>
626 <item row="0" column="3"> 647 <item row="0" column="3">
627 <widget class="QSpinBox" name="editor_notebook_tab_width_min"> 648 <widget class="QSpinBox" name="editor_notebook_tab_width_min">
649 <property name="sizePolicy">
650 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
651 <horstretch>0</horstretch>
652 <verstretch>0</verstretch>
653 </sizepolicy>
654 </property>
628 <property name="minimum"> 655 <property name="minimum">
629 <number>80</number> 656 <number>80</number>
630 </property> 657 </property>
631 <property name="maximum"> 658 <property name="maximum">
632 <number>600</number> 659 <number>600</number>
652 </property> 679 </property>
653 </spacer> 680 </spacer>
654 </item> 681 </item>
655 <item row="0" column="5"> 682 <item row="0" column="5">
656 <widget class="QSpinBox" name="editor_notebook_tab_width_max"> 683 <widget class="QSpinBox" name="editor_notebook_tab_width_max">
684 <property name="sizePolicy">
685 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
686 <horstretch>0</horstretch>
687 <verstretch>0</verstretch>
688 </sizepolicy>
689 </property>
657 <property name="minimum"> 690 <property name="minimum">
658 <number>180</number> 691 <number>180</number>
659 </property> 692 </property>
660 <property name="maximum"> 693 <property name="maximum">
661 <number>600</number> 694 <number>600</number>
693 </property> 726 </property>
694 </spacer> 727 </spacer>
695 </item> 728 </item>
696 <item row="6" column="0"> 729 <item row="6" column="0">
697 <widget class="QCheckBox" name="editor_long_line_marker"> 730 <widget class="QCheckBox" name="editor_long_line_marker">
731 <property name="sizePolicy">
732 <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
733 <horstretch>0</horstretch>
734 <verstretch>0</verstretch>
735 </sizepolicy>
736 </property>
698 <property name="toolTip"> 737 <property name="toolTip">
699 <string>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</string> 738 <string>This works well for monospaced fonts. The line is drawn at a position based on the width of a space character in the default font. It may not work very well if styles use proportional fonts or if varied font sizes or bold, italic and normal texts are used.</string>
700 </property> 739 </property>
701 <property name="text"> 740 <property name="text">
702 <string>Draw a long line marker</string> 741 <string>Draw a long line marker</string>
706 </property> 745 </property>
707 </widget> 746 </widget>
708 </item> 747 </item>
709 <item row="7" column="0"> 748 <item row="7" column="0">
710 <widget class="QCheckBox" name="cb_code_folding"> 749 <widget class="QCheckBox" name="cb_code_folding">
750 <property name="sizePolicy">
751 <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
752 <horstretch>0</horstretch>
753 <verstretch>0</verstretch>
754 </sizepolicy>
755 </property>
711 <property name="text"> 756 <property name="text">
712 <string>Enable Code Folding</string> 757 <string>Enable Code Folding</string>
713 </property> 758 </property>
714 <property name="checked"> 759 <property name="checked">
715 <bool>true</bool> 760 <bool>true</bool>
716 </property> 761 </property>
717 </widget> 762 </widget>
718 </item> 763 </item>
719 <item row="8" column="0"> 764 <item row="8" column="0">
720 <widget class="QCheckBox" name="cb_edit_status_bar"> 765 <widget class="QCheckBox" name="cb_edit_status_bar">
766 <property name="sizePolicy">
767 <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
768 <horstretch>0</horstretch>
769 <verstretch>0</verstretch>
770 </sizepolicy>
771 </property>
721 <property name="text"> 772 <property name="text">
722 <string>Show status bar</string> 773 <string>Show status bar</string>
723 </property> 774 </property>
724 <property name="checked"> 775 <property name="checked">
725 <bool>true</bool> 776 <bool>true</bool>
726 </property> 777 </property>
727 </widget> 778 </widget>
728 </item> 779 </item>
729 <item row="4" column="0"> 780 <item row="4" column="0">
730 <widget class="QCheckBox" name="cb_show_eol"> 781 <widget class="QCheckBox" name="cb_show_eol">
782 <property name="sizePolicy">
783 <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
784 <horstretch>0</horstretch>
785 <verstretch>0</verstretch>
786 </sizepolicy>
787 </property>
731 <property name="text"> 788 <property name="text">
732 <string>Show EOL characters</string> 789 <string>Show EOL characters</string>
733 </property> 790 </property>
734 </widget> 791 </widget>
735 </item> 792 </item>
742 </property> 799 </property>
743 </widget> 800 </widget>
744 </item> 801 </item>
745 <item> 802 <item>
746 <widget class="QComboBox" name="combo_eol_mode"> 803 <widget class="QComboBox" name="combo_eol_mode">
804 <property name="sizePolicy">
805 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
806 <horstretch>0</horstretch>
807 <verstretch>0</verstretch>
808 </sizepolicy>
809 </property>
747 <property name="sizeAdjustPolicy"> 810 <property name="sizeAdjustPolicy">
748 <enum>QComboBox::AdjustToContents</enum> 811 <enum>QComboBox::AdjustToContents</enum>
749 </property> 812 </property>
750 <property name="minimumContentsLength"> 813 <property name="minimumContentsLength">
751 <number>7</number> 814 <number>7</number>
785 <item row="9" column="0"> 848 <item row="9" column="0">
786 <widget class="QCheckBox" name="cb_show_hscrollbar"> 849 <widget class="QCheckBox" name="cb_show_hscrollbar">
787 <property name="enabled"> 850 <property name="enabled">
788 <bool>true</bool> 851 <bool>true</bool>
789 </property> 852 </property>
853 <property name="sizePolicy">
854 <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
855 <horstretch>0</horstretch>
856 <verstretch>0</verstretch>
857 </sizepolicy>
858 </property>
790 <property name="text"> 859 <property name="text">
791 <string>Show horizontal scroll bar</string> 860 <string>Show horizontal scroll bar</string>
792 </property> 861 </property>
793 <property name="checked"> 862 <property name="checked">
794 <bool>true</bool> 863 <bool>true</bool>
804 </property> 873 </property>
805 </widget> 874 </widget>
806 </item> 875 </item>
807 <item> 876 <item>
808 <layout class="QGridLayout" name="gridLayout_4"> 877 <layout class="QGridLayout" name="gridLayout_4">
809 <property name="verticalSpacing">
810 <number>0</number>
811 </property>
812 <item row="0" column="0"> 878 <item row="0" column="0">
813 <widget class="QLabel" name="label_13"> 879 <widget class="QLabel" name="label_13">
814 <property name="text"> 880 <property name="text">
815 <string>Indent width</string> 881 <string>Indent width</string>
816 </property> 882 </property>
846 </property> 912 </property>
847 </widget> 913 </widget>
848 </item> 914 </item>
849 <item row="0" column="2"> 915 <item row="0" column="2">
850 <widget class="QSpinBox" name="editor_ind_width_spinbox"> 916 <widget class="QSpinBox" name="editor_ind_width_spinbox">
917 <property name="sizePolicy">
918 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
919 <horstretch>0</horstretch>
920 <verstretch>0</verstretch>
921 </sizepolicy>
922 </property>
851 <property name="minimum"> 923 <property name="minimum">
852 <number>1</number> 924 <number>1</number>
853 </property> 925 </property>
854 <property name="maximum"> 926 <property name="maximum">
855 <number>32</number> 927 <number>32</number>
873 </property> 945 </property>
874 </widget> 946 </widget>
875 </item> 947 </item>
876 <item row="2" column="2"> 948 <item row="2" column="2">
877 <widget class="QSpinBox" name="editor_tab_width_spinbox"> 949 <widget class="QSpinBox" name="editor_tab_width_spinbox">
950 <property name="sizePolicy">
951 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
952 <horstretch>0</horstretch>
953 <verstretch>0</verstretch>
954 </sizepolicy>
955 </property>
878 <property name="minimum"> 956 <property name="minimum">
879 <number>1</number> 957 <number>1</number>
880 </property> 958 </property>
881 <property name="maximum"> 959 <property name="maximum">
882 <number>32</number> 960 <number>32</number>
1404 </property> 1482 </property>
1405 </widget> 1483 </widget>
1406 </item> 1484 </item>
1407 <item> 1485 <item>
1408 <widget class="QFontComboBox" name="terminal_fontName"> 1486 <widget class="QFontComboBox" name="terminal_fontName">
1487 <property name="sizePolicy">
1488 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
1489 <horstretch>0</horstretch>
1490 <verstretch>0</verstretch>
1491 </sizepolicy>
1492 </property>
1409 <property name="editable"> 1493 <property name="editable">
1410 <bool>false</bool> 1494 <bool>false</bool>
1411 </property> 1495 </property>
1412 <property name="fontFilters"> 1496 <property name="fontFilters">
1413 <set>QFontComboBox::MonospacedFonts</set> 1497 <set>QFontComboBox::MonospacedFonts</set>
1425 </property> 1509 </property>
1426 </widget> 1510 </widget>
1427 </item> 1511 </item>
1428 <item> 1512 <item>
1429 <widget class="QSpinBox" name="terminal_fontSize"> 1513 <widget class="QSpinBox" name="terminal_fontSize">
1514 <property name="sizePolicy">
1515 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
1516 <horstretch>0</horstretch>
1517 <verstretch>0</verstretch>
1518 </sizepolicy>
1519 </property>
1430 <property name="minimum"> 1520 <property name="minimum">
1431 <number>2</number> 1521 <number>2</number>
1432 </property> 1522 </property>
1433 <property name="maximum"> 1523 <property name="maximum">
1434 <number>96</number> 1524 <number>96</number>
1458 <property name="topMargin"> 1548 <property name="topMargin">
1459 <number>0</number> 1549 <number>0</number>
1460 </property> 1550 </property>
1461 <item> 1551 <item>
1462 <widget class="QSpinBox" name="terminal_history_buffer"> 1552 <widget class="QSpinBox" name="terminal_history_buffer">
1553 <property name="sizePolicy">
1554 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
1555 <horstretch>0</horstretch>
1556 <verstretch>0</verstretch>
1557 </sizepolicy>
1558 </property>
1463 <property name="minimum"> 1559 <property name="minimum">
1464 <number>0</number> 1560 <number>0</number>
1465 </property> 1561 </property>
1466 <property name="maximum"> 1562 <property name="maximum">
1467 <number>5000</number> 1563 <number>5000</number>
1552 </property> 1648 </property>
1553 </widget> 1649 </widget>
1554 </item> 1650 </item>
1555 <item> 1651 <item>
1556 <widget class="QGroupBox" name="terminal_colors_box"> 1652 <widget class="QGroupBox" name="terminal_colors_box">
1557 <property name="minimumSize">
1558 <size>
1559 <width>0</width>
1560 <height>81</height>
1561 </size>
1562 </property>
1563 <property name="title"> 1653 <property name="title">
1564 <string>Terminal Colors</string> 1654 <string>Terminal Colors</string>
1565 </property> 1655 </property>
1566 </widget> 1656 </widget>
1567 </item> 1657 </item>
1703 <string>Startup path</string> 1793 <string>Startup path</string>
1704 </property> 1794 </property>
1705 </widget> 1795 </widget>
1706 </item> 1796 </item>
1707 <item row="1" column="1"> 1797 <item row="1" column="1">
1708 <widget class="QLineEdit" name="le_file_browser_dir"/> 1798 <widget class="QLineEdit" name="le_file_browser_dir">
1799 <property name="sizePolicy">
1800 <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
1801 <horstretch>0</horstretch>
1802 <verstretch>0</verstretch>
1803 </sizepolicy>
1804 </property>
1805 </widget>
1709 </item> 1806 </item>
1710 <item row="0" column="1"> 1807 <item row="0" column="1">
1711 <widget class="QCheckBox" name="cb_restore_file_browser_dir"> 1808 <widget class="QCheckBox" name="cb_restore_file_browser_dir">
1712 <property name="text"> 1809 <property name="text">
1713 <string>Restore last directory of previous session</string> 1810 <string>Restore last directory of previous session</string>
1714 </property> 1811 </property>
1715 </widget> 1812 </widget>
1716 </item> 1813 </item>
1717 <item row="1" column="2"> 1814 <item row="1" column="2">
1718 <widget class="QPushButton" name="pb_file_browser_dir"> 1815 <widget class="QPushButton" name="pb_file_browser_dir">
1816 <property name="sizePolicy">
1817 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
1818 <horstretch>0</horstretch>
1819 <verstretch>0</verstretch>
1820 </sizepolicy>
1821 </property>
1719 <property name="text"> 1822 <property name="text">
1720 <string>Browse</string> 1823 <string>Browse</string>
1721 </property> 1824 </property>
1722 </widget> 1825 </widget>
1723 </item> 1826 </item>
1807 <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> 1910 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
1808 <horstretch>0</horstretch> 1911 <horstretch>0</horstretch>
1809 <verstretch>0</verstretch> 1912 <verstretch>0</verstretch>
1810 </sizepolicy> 1913 </sizepolicy>
1811 </property> 1914 </property>
1812 <property name="minimumSize">
1813 <size>
1814 <width>0</width>
1815 <height>81</height>
1816 </size>
1817 </property>
1818 <property name="title"> 1915 <property name="title">
1819 <string>Colors for variable attributes </string> 1916 <string>Colors for variable attributes </string>
1820 </property> 1917 </property>
1821 </widget> 1918 </widget>
1822 </item> 1919 </item>