How to increase width of docfx article page (based-on default theme)? - twitter-bootstrap-3

I am using docfx 2.43.3 with own theme (based on default theme). This is the result: http://docs.example.com/.
In this article page, http://docs.example.com/articles/add_more.html.
How would you increase the width of this page (all page and main block)?

As a possible first step, you could try changing all containers to container-fluid.
var containers = $(".container");
containers.removeClass("container");
containers.addClass("container-fluid");

Related

How do I resize an array of squished PyQt5 widgets? [duplicate]

I have a QScrollArea Widget, which starts empty;
It has a vertical layout, with a QGridLayout, and a vertical spacer to keep it at the top, and prevent it from stretching over the whole scroll area;
Elsewhere in the program, there is a QTextEdit, which when changed, has its contents scanned for "species" elements, and then they are added to the QGridLayout. Any species elements which have been removed are removed too. This bit works;
I have turned the vertical scrollbar on all the time, so that when it appears it does not sit on top of the other stuff in there. Note that the scroll bar is larger than the scroll box already though, despite not needing to be.
This is the problem. The scroll area seems to be preset, and i cannot change it. If i add more rows to the QGridLayout, the scroll area doesn't increase in size.
Instead, it stays the same size, and squeezes the QGridLayout, making it look ugly (at first);
And then after adding even more it becomes unusable;
Note that again, the scroll bar is still the same size as in previous images. The first two images are from Qt Designer, the subsequent 3 are from the program running.
If I resize the window so that the QScrollArea grows, then I see this:
Indicating that there's some layout inside the scroll area that is not resizing properly.
My question is; what do I need to do to make the scrollable area of the widget resize dynamically as I add and remove from the QGridLayout?
If you're coming here from Google and not having luck with the accepted answer, that's because you're missing the other secret invocation: QScrollArea::setWidget. You must create and explicitly identify a single widget which is to be scrolled. It's not enough to just add the item as a child! Adding multiple items directly to the ScrollArea will also not work.
This script demonstrates a simple working example of QScrollArea:
from PySide.QtGui import *
app = QApplication([])
scroll = QScrollArea()
scroll.setWidgetResizable(True) # CRITICAL
inner = QFrame(scroll)
inner.setLayout(QVBoxLayout())
scroll.setWidget(inner) # CRITICAL
for i in range(40):
b = QPushButton(inner)
b.setText(str(i))
inner.layout().addWidget(b)
scroll.show()
app.exec_()
The documentation provide an answer :
widgetResizable : bool
This property holds whether the scroll area should resize the view widget.
If this property is set to false (the default), the scroll area honors the size of its widget.
Set it to true.
Why don't you use a QListView for your rows, it will manage all the issues for you? Just make sure that after you add it you click on the Class (top right window of designer) and assign a layout or it wont expand properly.
I use a QLIstWidget inside a QScrollArea to make a scrollable image list
Try this for adding other objects to the list, this is how I add an image to the list.
QImage& qim = myclass.getQTImage();
QImage iconImage = copyImageToSquareRegion(qim, ui->display_image->palette().color(QWidget::backgroundRole()));
QListWidgetItem* pItem = new QListWidgetItem(QIcon(QPixmap::fromImage(iconImage)), NULL);
pItem->setData(Qt::UserRole, "thumb" + QString::number(ui->ImageThumbList->count())); // probably not necessary for you
QString strTooltip = "a tooltip"
pItem->setToolTip(strTooltip);
ui->ImageThumbList->addItem(pItem);
Update on Artfunkel's answer:
Here's a PySide6 demo that uses a "Populate" button to run the for loop adding items to the scroll area. Each button will also delete itself when clicked.
from PySide6.QtWidgets import *
app = QApplication([])
scroll = QScrollArea()
scroll.setWidgetResizable(True) # CRITICAL
inner = QFrame(scroll)
inner.setLayout(QVBoxLayout())
scroll.setWidget(inner) # CRITICAL
def on_remove_widget(button):
button.deleteLater()
def populate():
for i in range(40):
b = QPushButton(inner)
b.setText(str(i))
b.clicked.connect(b.deleteLater)
inner.layout().addWidget(b)
b = QPushButton(inner)
b.setText("Populate")
b.clicked.connect(populate)
inner.layout().addWidget(b)
scroll.show()
app.exec()

TYPO3 6.2: Tab "Appearance" disappeared (maybe caused by t3sbootstrap extension?)

When editing an image content element in TYPO3, usually there is a tab "appearance" with options for image size, alignment, position etc. In my installation that tab is not showing, but instead a "nameless" tab. I'm using the t3sbootstrap extension and this behaviour might be caused by bootstrap.
Does anyone know how I can make the appearance tab visible and usable again? I've searched the internet but didn't find anything helpful so far. Thanks for your help!
Here is a screenshot from my backend:
Apparently this problem is caused by a corrupted TCA. I made the following changes in default TCA using System -> Configuration:
To restore the options for Layout, Top and bottom margins and frames, I set the following:
$TCA['tt_content']['palettes']['frames']['showitem'] = 'layout;LLL:EXT:cms/locallang_ttc.xlf:layout_formlabel, spaceBefore;LLL:EXT:cms/locallang_ttc.xlf:spaceBefore_formlabel, spaceAfter;LLL:EXT:cms/locallang_ttc.xlf:spaceAfter_formlabel, section_frame;LLL:EXT:cms/locallang_ttc.xlf:section_frame_formlabel';
To restore the appearance tab title:
In $TCA['tt_content']['types']['image']['showitem'] I changed LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance to LLL:EXT:cms/locallang_ttc.xlf:tabs.appearance
To restore the image adjustments:
In $TCA['tt_content']['types']['image']['showitem'] I changed --div-- to --palette-- right after the frames part and I added LLL:EXT:cms/locallang_ttc.xlf:palette.image_settings;image_settings, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.imageblock;imageblock, --div--; after the frames part.
This is the result:
$TCA['tt_content']['types']['image']['showitem'] = '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.images, image, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.imagelinks;imagelinks, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.appearance, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.frames;frames, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.image_settings;image_settings, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.imageblock;imageblock, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.visibility;visibility, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.access;access, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended, , --div--;LLL:EXT:flux/Resources/Private/Language/locallang.xlf:tt_content.tabs.relation, tx_flux_parent, tx_flux_column, tx_flux_children;LLL:EXT:flux/Resources/Private/Language/locallang.xlf:tt_content.tx_flux_children';
Result
After making these changes, the result is the following:

Can <condPageBreak height='?cm'> change dynamically?

I have a <blockTable> that change size depending an user input.
I want to continue drawing on next page if there is no sufficient space to draw the blocktable on the same page.
<condPageBreak height='1in'/>
<blocklTable ...>
...
How can I change blockTable height to jump to the next page if there is not enough space on the current page?
I'm not sure about dynamically change or break page. But I use below method. May be it will useful to you.
Try with this RML reports.
The <condPageBreak/> tag is a "CONDitional Page Break". To use it, you give it a height in any units that RML can handle.
It then compares this height with the remaining available space on a page. If the space is sufficient, then the next elements are placed on the current page, but if there is less space than the height you have given it anything following the <condPageBreak/> is continued on the next page
<condPageBreak/> has only one attribute - the mandatory one of
height
For Example:
<condPageBreak height="1in"/>
<condPageBreak height="72"/>
For more details: RML User Guide
NOTE:
Use above examples before the start of <blockTable> tag
For Example:
<condPageBreak height="1in"/>
<blockTable style="Table4">
.
.
.
</blockTable>

How to specify page size in dynamically in yii view?

How to specify page size in dynamically in yii view?(not a grid view)
In my custom view page there is a search option to find list of users between 2 date
i need 2 know how to specify the page size dynamically? If number of rows less than 10 how to hide pagination ?
please check screen-shoot
I dont want the page navigation after search it confusing users..
my controller code
$criteria=new CDbCriteria();
$count=CustomerPayments::model()->count($criteria);
$pages=new CPagination($count);
// results per page
$pages->pageSize=10;
$pages->applyLimit($criteria);
$paymnt_details=CustomerPayments::model()->findAll($criteria);
$this->render('renewal',array('paymnt_details'=>$paymnt_details,'report'=>$report,'branch'=>$branch,'model'=>$model,'pages' => $pages,));
}
my view
Link
I'm assuming you want the entire list of search result be shown on a single page, no-matter how long it is?
If so, this is quite easy to achive.
As I can see in your code, you are now defining your pageSize to have a size of 10. You can update it to be dynamically be doing this:
$pages->pageSize = $count;
To remove the pagesizes you can change the css of your view file, but for that we would need your view file to see how you defined it.

Accessing the different regions of a border layout

In Sencha's API for border layout it says:
There is no BorderLayout.Region class in ExtJS 4.0+
What I found on various blogs, for accessing the center panel was this:
var viewPort = Ext.ComponentQuery.query('viewport')[0];
var centerR = viewPort.layout.centerRegion;
Again to the docs, I see that centerRegion is a private function (why?), and I don't care to rely on those, for future proofing. Also, there is no westRegion, northRegion, etc...
How does one get to these items?
I could of course get the items inside the regions: The various panels, and such, but I want complete control of the viewport that holds my border layout.
This is what I'm doing now:
var viewPort = Ext.ComponentQuery.query('viewport')[0];
var view = Ext.widget('my-new-tab-panel');
viewPort.layout.centerRegion.removeAll();
viewPort.layout.centerRegion.add(view);
Is there a better way?
Usually, I setup an id for each container I have to work with. So, my center region will have an id and I'll get it with Ext.getCmp() function.
Otherwise, to access to the viewport items you can do as follows:
var viewPort = Ext.ComponentQuery.query('viewport')[0];
var view = Ext.widget('my-new-tab-panel');
viewPort.items.items[0].removeAll();
viewPort.items.items[0].add(view);
If you've defined center region as the first item of viewport, then the above code it's ok but if you've defined it as the third or the fourth, then you have to change the index according to the position of your region (viewPort.items[3] or viewPort.items[4], etc).
Another way is to use query selector:
var cr = viewPort.down('panel[region=center]');
cr.removeAll();
cr.add(view);
However, following this way, you have to query on a precisely xtype (as panel in this case).
Anyway, I think the best way is to use an id for each region.