Part 1: Currently all graphics devices have to share a single row for their names, this method doesn't pretty well for devices with long names or computers that may have multiple GPUs. The new mockup fixes this by having a separate entry for each graphics device. This commit turns graphics_row into a GtkBox, graphics_row is going to act like a space where gpu entries will be placed. graphics_row will be populated in the code using create_graphics_row() to have separate entries for each graphics device Part 2: Currently all graphics devices have to share a single row for their names, this method doesn't pretty well for devices with l> The new mockup fixes this by having a separate entry for each graphics device. This commit adds a method to popuplate graphics_row with GPU information entries. It uses the existing logic from get_renderer_from_switcheroo to iterate over a list of graphics devices and build a CcInfoEntry for each device. It finally appends the widget to graphics_row Part 3: Currently all graphics devices have to share a single row for their names, this method doesn't pretty well for devices with l> The new mockup fixes this by having a separate entry for each graphics device. The list of graphics devices is now processed in create_graphics_rows function, so remove that logic from get_renderer_from_switcheroo () and return a GSList instead of a string. graphics_hardware_string has been renamed to graphics_hardware_list to imply the change. Since create_graphics_rows expects a list, get_graphics_hardware method has been modified to create a renderer list from the outputs of get_renderer_from_session or get_renderer_from_helper in case that get_renderer_from_switcheroo fails.
28 lines
961 B
XML
28 lines
961 B
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<interface>
|
|
<template class="CcListRow" parent="AdwActionRow">
|
|
<property name="activatable">True</property>
|
|
|
|
<!-- Secondary Label -->
|
|
<child type="suffix">
|
|
<object class="GtkLabel" id="secondary_label">
|
|
<property name="valign">center</property>
|
|
<property name="ellipsize">end</property>
|
|
<property name="selectable" bind-source="CcListRow" bind-property="activatable" bind-flags="sync-create|invert-boolean" />
|
|
<style>
|
|
<class name="dim-label"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Arrow -->
|
|
<child type="suffix">
|
|
<object class="GtkImage" id="arrow">
|
|
<property name="visible" bind-source="CcListRow" bind-property="show-arrow" bind-flags="sync-create"/>
|
|
<property name="valign">center</property>
|
|
<property name="icon-name">go-next-symbolic</property>
|
|
</object>
|
|
</child>
|
|
|
|
</template>
|
|
</interface>
|