mirror of
https://github.com/ckb-next/ckb-next.git
synced 2026-10-10 12:27:21 -04:00
improve some GUI elements in combination with macro tab
There are some contraints in using the TAB area for configuration. because of too many elements neccessary for the macro GUI, The font size had been set to 12px fix. If you find that is to small, you can change it by installing an own stylesheet file and calling ckb with ckb -stylesheet=<stylesheet-file> The complete TAB area (better the surrounding areas) should be redesigned...
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
SAVEFILE=~/.config/ckb/ckb.conf
|
||||
|
||||
###################
|
||||
#
|
||||
# Change the format of macro definitons from 4- to 5-parts.
|
||||
#
|
||||
#
|
||||
|
||||
# Find a line, beginning with '$macro:',
|
||||
# followed by exact 3 colon-separated strings.
|
||||
# The may not be a 4th string (it would be the new format).
|
||||
# If found, add a ':x' at the end.
|
||||
# Otherwise just print it.
|
||||
SEDLINE='/$macro:[^:]*:[^:]*:[^:]*$/s/$/:x/'
|
||||
|
||||
cp $SAVEFILE $SAVEFILE.orig
|
||||
|
||||
# some statistics
|
||||
echo -n "how many \$macro:-Statements to deal with: "
|
||||
grep "$macro:" $SAVEFILE | wc -l
|
||||
|
||||
echo -n "That number entries do we find: "
|
||||
sed -e $SEDLINE $SAVEFILE | grep "$macro:" | wc -l
|
||||
|
||||
echo -n "how many lines without \$macro:-statements: "
|
||||
grep -v "$macro:" $SAVEFILE | wc -l
|
||||
|
||||
echo -n "That many entries are ignored: "
|
||||
sed -e $SEDLINE $SAVEFILE | grep -v "$macro:" | wc -l
|
||||
|
||||
read -p "Is the information correct? [y|n] " RL
|
||||
RL=${RL:-n}
|
||||
|
||||
if [[ ${RL} != "y" ]]; then
|
||||
echo you typed $RL.
|
||||
echo "Aborted."
|
||||
exit -1;
|
||||
fi
|
||||
|
||||
echo you typed $RL.
|
||||
sed -e $SEDLINE $SAVEFILE > $SAVEFILE.new
|
||||
rm -f $SAVEFILE
|
||||
mv $SAVEFILE.new $SAVEFILE
|
||||
wc $SAVEFILE
|
||||
grep :x$ $SAVEFILE
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,14 @@
|
||||
#include "macromigrationtip.h"
|
||||
#include "ui_macromigrationtip.h"
|
||||
|
||||
macroMigrationTip::macroMigrationTip(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::macroMigrationTip)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
macroMigrationTip::~macroMigrationTip()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef MACROMIGRATIONTIP_H
|
||||
#define MACROMIGRATIONTIP_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class macroMigrationTip;
|
||||
}
|
||||
|
||||
class macroMigrationTip : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit macroMigrationTip(QWidget *parent = 0);
|
||||
~macroMigrationTip();
|
||||
|
||||
private:
|
||||
Ui::macroMigrationTip *ui;
|
||||
};
|
||||
|
||||
#endif // MACROMIGRATIONTIP_H
|
||||
@@ -0,0 +1,71 @@
|
||||
<ui version="4.0">
|
||||
<author/>
|
||||
<comment/>
|
||||
<exportmacro/>
|
||||
<class>macroMigrationTip</class>
|
||||
<widget name="macroMigrationTip" class="QDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget name="buttonBox" class="QDialogButtonBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>240</y>
|
||||
<width>341</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<pixmapfunction/>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>macroMigrationTip</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>macroMigrationTip</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user