chatgpt: fix logo (#195)

This commit is contained in:
end-4
2024-01-20 23:40:17 +07:00
parent 00e5aa8f50
commit d56860c527
+3 -3
View File
@@ -27,13 +27,13 @@ const ChatGPTInfo = () => {
hpack: 'center', hpack: 'center',
className: 'sidebar-chat-welcome-logo', className: 'sidebar-chat-welcome-logo',
icon: `${App.configDir}/assets/openai-logomark.svg`, icon: `${App.configDir}/assets/openai-logomark.svg`,
setup: (self) => Utils.timeout(1, () => { setup: (self) => Utils.timeout(400, () => { // A long wait, but no one's going to open sidebar right on init anyway
const styleContext = self.get_style_context(); const styleContext = self.get_style_context();
const width = styleContext.get_property('min-width', Gtk.StateFlags.NORMAL); const width = styleContext.get_property('min-width', Gtk.StateFlags.NORMAL);
const height = styleContext.get_property('min-height', Gtk.StateFlags.NORMAL); const height = styleContext.get_property('min-height', Gtk.StateFlags.NORMAL);
self.size = Math.max(width, height, 1) * 116 / 180; // Why such a specific proportion? See https://openai.com/brand#logos self.size = Math.max(width, height, 1) * 116 / 180; // Why such a specific proportion? See https://openai.com/brand#logos
}) })
}); })
return Box({ return Box({
vertical: true, vertical: true,
className: 'spacing-v-15', className: 'spacing-v-15',
@@ -92,7 +92,7 @@ export const ChatGPTSettings = () => MarginRevealer({
{ value: 0.50, name: 'Balanced', }, { value: 0.50, name: 'Balanced', },
{ value: 1.00, name: 'Creative', }, { value: 1.00, name: 'Creative', },
], ],
initIndex: 1, initIndex: 2,
onChange: (value, name) => { onChange: (value, name) => {
ChatGPT.temperature = value; ChatGPT.temperature = value;
}, },