View Single Post
Old 01-05-2024, 02:24 PM   #10
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@kovid: I confirm that comments are shown as vertical even if the layout is set to narrow. It seems to be related to no longer requiring the restart when changing layout. If I look in gui2/init.py I see at line 503:
Code:
    def init_layout_mixin(self):
        self.vl_tabs = VLTabs(self)
        self.centralwidget.layout().addWidget(self.vl_tabs)
        self.layout_container = CentralContainer(self)
        self.centralwidget.layout().addWidget(self.layout_container)
        print(f'****** self.layout_container.is_wide {self.layout_container.is_wide}')
        self.book_details = BookDetails(self.layout_container.is_wide, self)
The print statement I added shows this:
Code:
****** self.layout_container.is_wide True
even if the layout is narrow. If I change the line after the print statement to
Code:
        print(f'****** self.layout_container.is_wide {self.layout_container.is_wide}')
        self.book_details = BookDetails(False, self)
then it works correctly in narrow mode, but of course doesn't work correctly in wide mode.

I don't see any way to change the "vertical" parameter given to BookDetails after calibre is initialized. It is used in several further class instantiations within BookDetails. Reinstantiating the classes would work in theory but I doubt it would work in practice, leaving all sorts of signals etc hanging.
chaley is offline   Reply With Quote