Mercurial > minori
comparison src/gui/dialog/information.cpp @ 62:4c6dd5999b39
*: update
1. updated animia
2. use widestrings for filesystem on Windows
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 01 Oct 2023 06:16:06 -0400 |
parents | 75c804f713b2 |
children | 3d2decf093bb |
comparison
equal
deleted
inserted
replaced
61:327568ad9be9 | 62:4c6dd5999b39 |
---|---|
141 QWidget* subsection = new QWidget(section); \ | 141 QWidget* subsection = new QWidget(section); \ |
142 subsection->setLayout(new QVBoxLayout); \ | 142 subsection->setLayout(new QVBoxLayout); \ |
143 subsection->setFixedWidth(LAYOUT_ITEM_WIDTH); \ | 143 subsection->setFixedWidth(LAYOUT_ITEM_WIDTH); \ |
144 subsection->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); \ | 144 subsection->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); \ |
145 subsection->layout()->setSpacing(LAYOUT_VERT_SPACING); \ | 145 subsection->layout()->setSpacing(LAYOUT_VERT_SPACING); \ |
146 subsection->layout()->setMargin(0); \ | 146 subsection->layout()->setContentsMargins(0, 0, 0, 0); \ |
147 x; \ | 147 x; \ |
148 layout->addWidget(subsection); \ | 148 layout->addWidget(subsection); \ |
149 } | 149 } |
150 /* Creates a section in the parent `a` */ | 150 /* Creates a section in the parent `a` */ |
151 #define CREATE_SECTION(a, x) \ | 151 #define CREATE_SECTION(a, x) \ |
152 { \ | 152 { \ |
153 QWidget* section = new QWidget(a); \ | 153 QWidget* section = new QWidget(a); \ |
154 QHBoxLayout* layout = new QHBoxLayout(section); \ | 154 QHBoxLayout* layout = new QHBoxLayout(section); \ |
155 layout->setSpacing(LAYOUT_HORIZ_SPACING); \ | 155 layout->setSpacing(LAYOUT_HORIZ_SPACING); \ |
156 layout->setMargin(0); \ | 156 layout->setContentsMargins(0, 0, 0, 0); \ |
157 x; \ | 157 x; \ |
158 layout->addStretch(); \ | 158 layout->addStretch(); \ |
159 a->layout()->addWidget(section); \ | 159 a->layout()->addWidget(section); \ |
160 } | 160 } |
161 /* Creates a subsection that takes up whatever space is necessary */ | 161 /* Creates a subsection that takes up whatever space is necessary */ |
163 { \ | 163 { \ |
164 QWidget* subsection = new QWidget(section); \ | 164 QWidget* subsection = new QWidget(section); \ |
165 subsection->setLayout(new QVBoxLayout); \ | 165 subsection->setLayout(new QVBoxLayout); \ |
166 subsection->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); \ | 166 subsection->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); \ |
167 subsection->layout()->setSpacing(LAYOUT_VERT_SPACING); \ | 167 subsection->layout()->setSpacing(LAYOUT_VERT_SPACING); \ |
168 subsection->layout()->setMargin(0); \ | 168 subsection->layout()->setContentsMargins(0, 0, 0, 0); \ |
169 x; \ | 169 x; \ |
170 layout->addWidget(subsection); \ | 170 layout->addWidget(subsection); \ |
171 } | 171 } |
172 /* Creates a section in the parent `a` */ | 172 /* Creates a section in the parent `a` */ |
173 #define CREATE_FULL_WIDTH_SECTION(a, x) \ | 173 #define CREATE_FULL_WIDTH_SECTION(a, x) \ |
174 { \ | 174 { \ |
175 QWidget* section = new QWidget(a); \ | 175 QWidget* section = new QWidget(a); \ |
176 QHBoxLayout* layout = new QHBoxLayout(section); \ | 176 QHBoxLayout* layout = new QHBoxLayout(section); \ |
177 layout->setSpacing(LAYOUT_HORIZ_SPACING); \ | 177 layout->setSpacing(LAYOUT_HORIZ_SPACING); \ |
178 layout->setMargin(0); \ | 178 layout->setContentsMargins(0, 0, 0, 0); \ |
179 x; \ | 179 x; \ |
180 a->layout()->addWidget(section); \ | 180 a->layout()->addWidget(section); \ |
181 } | 181 } |
182 | 182 |
183 CREATE_SECTION(sg_anime_list_content, { | 183 CREATE_SECTION(sg_anime_list_content, { |
317 tabbed_widget->addTab(settings_widget, tr("My list and settings")); | 317 tabbed_widget->addTab(settings_widget, tr("My list and settings")); |
318 | 318 |
319 QVBoxLayout* main_layout = new QVBoxLayout; | 319 QVBoxLayout* main_layout = new QVBoxLayout; |
320 main_layout->addWidget(anime_title); | 320 main_layout->addWidget(anime_title); |
321 main_layout->addWidget(tabbed_widget); | 321 main_layout->addWidget(tabbed_widget); |
322 main_layout->setMargin(0); | 322 main_layout->setContentsMargins(0, 0, 0, 0); |
323 main_widget->setLayout(main_layout); | 323 main_widget->setLayout(main_layout); |
324 | 324 |
325 QHBoxLayout* layout = new QHBoxLayout; | 325 QHBoxLayout* layout = new QHBoxLayout; |
326 layout->addWidget(sidebar); | 326 layout->addWidget(sidebar); |
327 layout->addWidget(main_widget); | 327 layout->addWidget(main_widget); |