Add window size config window

This commit is contained in:
daleclack 2022-02-02 13:12:11 +08:00
parent d0f9f6bbf2
commit 41c83c45eb
3 changed files with 249 additions and 22 deletions

View File

@ -28,6 +28,7 @@ set(SOURCE_FILE src/main.cc src/MyWin.cc src/MyPrefs.cc ../cfgfile/cfgfile.cc)
set(RESOURCE_LIST set(RESOURCE_LIST
icons/16x16/actions/list-add.svg icons/16x16/actions/list-add.svg
icons/16x16/actions/list-remove.svg icons/16x16/actions/list-remove.svg
icons/scalable/status/display_prefs.svg
folder.svg folder.svg
folder-images.svg folder-images.svg
image_file.svg image_file.svg

View File

@ -0,0 +1,54 @@
<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<linearGradient id="a">
<stop stop-color="#909090" offset="0"/>
<stop stop-color="#636363" stop-opacity="0" offset="1"/>
</linearGradient>
<radialGradient id="b" cx="199.22" cy="60.978" r="62.148" gradientTransform="matrix(1.0119 3e-8 -1.5e-7 5.0958 -134.28 -251.23)" gradientUnits="userSpaceOnUse">
<stop stop-color="#e6e6e8" offset="0"/>
<stop stop-color="#cbccce" offset="1"/>
</radialGradient>
<radialGradient id="c" cx="199.22" cy="60.978" r="62.148" gradientTransform="matrix(1.3103 -4e-8 1e-7 3.6151 -193.73 -160.94)" gradientUnits="userSpaceOnUse">
<stop stop-color="#ececef" offset="0"/>
<stop stop-color="#cbccce" stop-opacity="0" offset="1"/>
</radialGradient>
<filter id="d" x="-.01448" y="-.016908" width="1.029" height="1.0338" color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation=".74992302"/>
</filter>
<linearGradient id="e" x1="174.79" x2="174.86" y1="109.47" y2="118.12" gradientUnits="userSpaceOnUse">
<stop stop-color="#909090" offset="0"/>
<stop stop-color="#727272" stop-opacity="0" offset="1"/>
</linearGradient>
<radialGradient id="f" cx="178.79" cy="120.7" r="22.055" gradientTransform="matrix(3.8591 -2.3e-7 0 .1388 -511.17 103.95)" gradientUnits="userSpaceOnUse" xlink:href="#a"/>
<filter id="g" x="-.040865" y="-.504" width="1.0817" height="2.008" color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation=".32830532"/>
</filter>
<filter id="h" x="-.080467" y="-.24545" width="1.1609" height="1.4909" color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation="1.4789442"/>
</filter>
<linearGradient id="i" x1="183.06" x2="183.06" y1="129.42" y2="127.06" gradientUnits="userSpaceOnUse" xlink:href="#a"/>
<linearGradient id="j" x1="23.844" x2="23.816" y1="17.574" y2="85.151" gradientUnits="userSpaceOnUse">
<stop stop-color="#1bd2fa" offset="0"/>
<stop stop-color="#1c7ef2" offset="1"/>
</linearGradient>
<g transform="matrix(.48966 0 0 .48209 -.95621 -1.3862)">
<g stroke-width="2.0582">
<rect x="5.1564" y="8.7788" width="124.3" height="103.95" rx="5.6617" fill="#1a1a1a" filter="url(#d)" opacity=".887"/>
<rect x="5.1564" y="8.7788" width="124.3" height="103.95" rx="5.6617" fill="url(#b)"/>
<rect x="5.1564" y="8.7788" width="124.3" height="103.95" rx="5.6617" fill="url(#c)"/>
<path d="m10.818 8.778c-3.1366 0-5.6621 2.5256-5.6621 5.6621v75.664h124.3v-75.664c0-3.1366-2.5256-5.6621-5.6621-5.6621z" fill="#080808"/>
<path d="m10.318 12.353h113.49v73.329h-113.49z" fill="url(#j)"/>
<path d="m5.1558 106.01v1.0566c0 3.1366 2.5256 5.6621 5.6621 5.6621h112.97c3.1366 0 5.6621-2.5256 5.6621-5.6621v-1.0566c0 3.1366-2.5256 5.6621-5.6621 5.6621h-112.97c-3.1366 0-5.6621-2.5256-5.6621-5.6621z" fill="#afafaf"/>
<g transform="translate(-111.48 -1.4739)">
<path d="m194.34 114.95c-0.0882 3.6995-0.94643 7.8217 4.9506 11.334 4.7067 2.9258-2.6114 3.1267-4.4295 3.1267h-5.6672-26.478c-1.8181 0-9.1362-0.20092-4.4295-3.1267 5.8971-3.5127 5.0389-7.6349 4.9506-11.334z" filter="url(#h)"/>
<path d="m194.34 113.47c-0.0882 3.6995-0.94643 7.8217 4.9506 11.334 4.7067 2.9258-2.6114 3.1267-4.4295 3.1267-10.492 0.46272-21.162 0.7623-32.145 0-1.8181 0-9.1362-0.20092-4.4295-3.1267 5.8971-3.5127 5.0389-7.6349 4.9506-11.334z" fill="#e0e1e6"/>
<path d="m194.34 113.47c-0.0882 3.6995-0.94643 7.8217 4.9506 11.334 4.7067 2.9258-2.6114 3.1267-4.4295 3.1267h-5.6672-26.478c-1.8181 0-9.1362-0.20092-4.4295-3.1267 5.8971-3.5127 5.0389-7.6349 4.9506-11.334z" fill="url(#e)"/>
<path d="m194.34 113.47c-0.0882 3.6995-0.94643 7.8217 4.9506 11.334 4.7067 2.9258-2.6114 3.1267-4.4295 3.1267h-5.6672-26.478c-1.8181 0-9.1362-0.20092-4.4295-3.1267 5.8971-3.5127 5.0389-7.6349 4.9506-11.334z" fill="url(#f)"/>
<ellipse cx="178.29" cy="127.15" rx="15.764" ry=".78168" fill="#fff" filter="url(#g)" opacity=".887"/>
<path d="m194.34 113.47c-0.0882 3.6995-0.94643 7.8217 4.9506 11.334 4.7067 2.9258-2.6114 3.1267-4.4295 3.1267h-5.6672-26.478c-1.8181 0-9.1362-0.20092-4.4295-3.1267 5.8971-3.5127 5.0389-7.6349 4.9506-11.334z" fill="url(#i)"/>
</g>
</g>
<path d="m71.574 102.9c-0.16003 0.36969-0.34945 0.70998-0.56891 1.0228-0.29914 0.42652-0.54408 0.72174-0.73285 0.8857-0.29261 0.26911-0.60613 0.4069-0.94186 0.41475-0.24102 0-0.53167-0.0687-0.87001-0.2077-0.33945-0.13848-0.6514-0.20705-0.93664-0.20705-0.29915 0-0.61998 0.0687-0.96315 0.20705-0.3437 0.13913-0.62057 0.21162-0.83226 0.21882-0.32195 0.0137-0.64285-0.12802-0.96316-0.42587-0.20444-0.1783-0.46015-0.48401-0.76648-0.91705-0.32868-0.46244-0.59889-0.99867-0.81058-1.61-0.22671-0.66033-0.34036-1.2998-0.34036-1.9189 0-0.70913 0.15323-1.3207 0.46015-1.8333 0.24121-0.41168 0.56211-0.73643 0.96374-0.97484 0.40163-0.2384 0.83559-0.35988 1.3029-0.36765 0.25572 0 0.59105 0.0791 1.0078 0.23454 0.41554 0.15598 0.68236 0.23507 0.79934 0.23507 0.0875 0 0.38386-0.0925 0.88634-0.27687 0.47518-0.171 0.87622-0.2418 1.2048-0.21391 0.89026 0.0718 1.5591 0.4228 2.0039 1.0551-0.79621 0.48241-1.1901 1.1581-1.1822 2.0249 7e-3 0.6752 0.25212 1.237 0.7335 1.6831 0.21816 0.20707 0.46179 0.36709 0.73285 0.48075-0.0588 0.17044-0.12084 0.33376-0.1868 0.49052zm-2.0418-8.0346c0 0.5292-0.19334 1.0233-0.5787 1.4806-0.46506 0.5437-1.0276 0.85787-1.6376 0.80829-8e-3 -0.0634-0.0123-0.13031-0.0123-0.20052 0-0.50803 0.22116-1.0517 0.61391-1.4963 0.19608-0.22508 0.44546-0.41224 0.74787-0.56153 0.30176-0.14706 0.5872-0.22839 0.85564-0.24232 8e-3 0.07076 0.0112 0.1415 0.0112 0.21169z" fill="#1e1f28" stroke-width=".13443"/>
<path d="m10.318 12.352v73.33h113.49v-73.33zm0.55273 0.50781h112.48v72.361h-112.48z" fill-opacity=".21198" stroke-width="2.0582"/>
<path d="m10.818 9.0273c-3.1366 0-5.6621 2.5256-5.6621 5.6621v75.414h124.3v-75.414c0-3.1366-2.5255-5.6621-5.6621-5.6621zm-0.5 5.3262h113.49v71.328h-113.49z" fill="#080808" stroke-width="2.0582"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -2,6 +2,16 @@
<!-- Generated with glade 3.38.2 --> <!-- Generated with glade 3.38.2 -->
<interface> <interface>
<requires lib="gtk+" version="3.24"/> <requires lib="gtk+" version="3.24"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">9999</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment2">
<property name="upper">9999</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkBox" id="stack_box"> <object class="GtkBox" id="stack_box">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
@ -46,13 +56,126 @@
</packing> </packing>
</child> </child>
<child> <child>
<!-- n-columns=3 n-rows=3 --> <object class="GtkBox" id="winsize_page">
<object class="GtkGrid" id="winsize_page">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="spacing">5</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="pixel-size">128</property>
<property name="icon-name">display_prefs</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<!-- n-columns=4 n-rows=5 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="row-spacing">5</property>
<property name="column-spacing">5</property>
<child>
<object class="GtkComboBoxText">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="active">2</property>
<items>
<item translatable="yes">640x360</item>
<item translatable="yes">800x450</item>
<item translatable="yes">1024x576</item>
<item translatable="yes">1280x720</item>
</items>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkRadioButton">
<property name="label" translatable="yes">Use default window size</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkRadioButton">
<property name="label" translatable="yes">User defined window size</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkSpinButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adjustment1</property>
<property name="value">1024</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkSpinButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="adjustment">adjustment2</property>
<property name="value">576</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">x</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">3</property>
</packing>
</child>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
@ -78,6 +201,55 @@
<placeholder/> <placeholder/>
</child> </child>
</object> </object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="halign">end</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing> <packing>
<property name="name">page1</property> <property name="name">page1</property>
<property name="title" translatable="yes">Window Size Config</property> <property name="title" translatable="yes">Window Size Config</property>