mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
LibWeb: Sort style properties by name in the inspector window
This commit is contained in:
parent
eb11ab2480
commit
d200385c1a
1 changed files with 3 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/QuickSort.h>
|
||||
#include <LibWeb/CSS/PropertyID.h>
|
||||
#include <LibWeb/CSS/StyleProperties.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
|
@ -40,6 +41,8 @@ StylePropertiesModel::StylePropertiesModel(const StyleProperties& properties)
|
|||
value.value = property_value.to_string();
|
||||
m_values.append(value);
|
||||
});
|
||||
|
||||
quick_sort(m_values, [](auto& a, auto& b) { return a.name < b.name; });
|
||||
}
|
||||
|
||||
int StylePropertiesModel::row_count(const GUI::ModelIndex&) const
|
||||
|
|
Loading…
Add table
Reference in a new issue